metacello
metacello copied to clipboard
Add Pharo 7 support
SmalltalkCI fails for Pharo 7 when using the useLatestMetacello
, apparently because the FileTree baseline isn't defined in BaselineOfMetacello for Pharo 7. I would provide a PR but I can't reproduce the issue outside of SmalltalkCI, so I'm not entirely sure.
To reproduce:
- clone
[email protected]:theseion/Seaside.git
-
git checkout develop
- In the SmalltalkCI directory run
./run.sh -s Pharo-7.0 --headful -d ../Seaside/.smalltalk.ston
I can reproduce this issue on one of my private Jenkins job. When I will have time I'll try to see if I can reproduce in local or not.
@theseion I can't reproduce in local but this is because the script used by Jenkins cannot be applied on Windows since Metacello's master branch has files with too long name.
But I can reproduce on MaterialDesignLite's Jenkins build:
example: https://ci.inria.fr/pharo-contribution/job/MaterialDesignLite/PHARO=70,VERSION=master/356/console
(If the log for 356 is not available anymore, just check the latest build for Pharo 70 master)
This is the script executed:
Iceberg enableMetacelloIntegration: false.
Metacello new
baseline: 'Metacello';
repository: 'github://dalehenrich/metacello-work:master/repository';
get.
Metacello new
baseline: 'Metacello';
repository: 'github://dalehenrich/metacello-work:master/repository';
onConflict: [ :ex | ex allow ];
load.
Maybe it can help...
I see SmalltalkCI use this script:
updateMetacello
(Smalltalk at: #Metacello) new
baseline: 'Metacello';
repository: 'github://Metacello/metacello:master/repository';
get.
(Smalltalk at: #Metacello) new
baseline: 'Metacello';
repository: 'github://Metacello/metacello:master/repository';
load: #( 'batch' )
If useLatestMetacello
is a SmalltalkCI feature, perhaps a bug should be reported against the SmalltalkCI project.... IIRC, there is strange magic required to update Metacello to the latest version in Phar7.0/6.0(?) and it seems that the magic is being handled by the SmalltalkCI, so if it is not working it isl more than likely to be a SmalltalkCI issue ...
@dalehenrich This is not a only a SmalltalkCI related issue.
Here is the error:
Fetched -> BaselineOfMetacello-EstebanLorenzano.97 --- github://dalehenrich/metacello-work:master/repository [2f5cd0f:master] --- github://dalehenrich/metacello-work:master/repository
Loaded -> BaselineOfMetacello-EstebanLorenzano.97 --- github://dalehenrich/metacello-work:master/repository [2f5cd0f:master] --- github://dalehenrich/metacello-work:master/repository
Fetched -> BaselineOfMetacello-EstebanLorenzano.97 --- github://dalehenrich/metacello-work:master/repository [2f5cd0f:master] --- github://dalehenrich/metacello-work:master/repository
Loaded -> BaselineOfMetacello-EstebanLorenzano.97 --- github://dalehenrich/metacello-work:master/repository [2f5cd0f:master] --- github://dalehenrich/metacello-work:master/repository
Loading baseline of BaselineOfMetacello...MetacelloNameNotDefinedError: project group, or package named: 'FileTree' not found when used in requires: or includes: field of package: 'Metacello-FileTree' for version: baseline of BaselineOfMetacello.
[ MetacelloNameNotDefinedError
signal:
'project group, or package named: ' , specName printString
, ' not found when used in requires: or includes: field of package: '
, self name printString , ' for version: '
, aVersionSpec versionString , ' of ' , aVersionSpec projectLabel
, '.'.
nil "return nil if resumed" ] in [ :specName |
| spec |
"get project/group/package specs"
This is pharo7.0 only? If you take a look at the Metacello .travis.yml file, you'll see that we are not testing Pharo7.0 on travis and I read this to mean that there are outstanding issues with Metacello and 7.0 ... that I am not privy too.
Perhaps @estebanlm can shed some light on this?
@estebanlm ping This is still an issue: https://travis-ci.org/SeasideSt/Seaside/jobs/313946580
is this still an issue?
I'll have to check. The current build failure is due to something different. I'll let you know.
In the latest Pharo 7 I executed:
Iceberg enableMetacelloIntegration: false.
Metacello new
baseline: 'Metacello';
repository: 'github://dalehenrich/metacello-work:master/repository';
get.
Metacello new
baseline: 'Metacello';
repository: 'github://dalehenrich/metacello-work:master/repository';
onConflict: [ :ex | ex allow ];
load.
And I get this error:
UndefinedObject(Object)>>doesNotUnderstand: #withSqueakLineEndings
MCFileTreeStCypressReader>>addClassAndMethodDefinitionsFromEntry:
[ :entry |
(entry name endsWith: '.trait')
ifTrue: [ self addTraitAndMethodDefinitionsFromEntry: entry ].
(entry name endsWith: '.class')
ifTrue: [ self addClassAndMethodDefinitionsFromEntry: entry ].
(entry name endsWith: '.extension')
ifTrue: [ self addExtensionClassAndMethodDefinitionsFromEntry: entry ] ] in MCFileTreeStCypressReader>>addClassAndMethodDefinitionsFromDirectory: in Block: [ :entry | ...
Array(SequenceableCollection)>>do:
MCFileTreeStCypressReader>>addClassAndMethodDefinitionsFromDirectory:
MCFileTreeStCypressReader>>loadDefinitions
MCFileTreeStCypressReader(MCVersionReader)>>definitions
MCFileTreeStCypressReader(MCVersionReader)>>snapshot
MCFileTreeStCypressReader>>basicVersion
MCFileTreeStCypressReader(MCVersionReader)>>version
@jecisc this seems to be an error created by a missing Readme.md in one of the Metacello classes on disk. Could you tell us which class or directory is it failing on?
Oh yes. It's probably because I'm on windows and the archive extraction is not complete since the file names are too long. Sorry for the noise.
I relaunched it on a Jenkins running on ubuntu:
Fetched -> BaselineOfMetacello-EstebanLorenzano.97 --- github://dalehenrich/metacello-work:master/repository [2f5cd0f:master] --- github://dalehenrich/metacello-work:master/repository
Loaded -> BaselineOfMetacello-EstebanLorenzano.97 --- github://dalehenrich/metacello-work:master/repository [2f5cd0f:master] --- github://dalehenrich/metacello-work:master/repository
Fetched -> BaselineOfMetacello-EstebanLorenzano.97 --- github://dalehenrich/metacello-work:master/repository [2f5cd0f:master] --- github://dalehenrich/metacello-work:master/repository
Loaded -> BaselineOfMetacello-EstebanLorenzano.97 --- github://dalehenrich/metacello-work:master/repository [2f5cd0f:master] --- github://dalehenrich/metacello-work:master/repository
Loading baseline of BaselineOfMetacello...[31mMetacelloNameNotDefinedError: project group, or package named: 'FileTree' not found when used in requires: or includes: field of package: 'Metacello-FileTree' for version: baseline of BaselineOfMetacello.
[0m[ MetacelloNameNotDefinedError
signal:
'project group, or package named: ' , specName printString
, ' not found when used in requires: or includes: field of package: '
, self name printString , ' for version: '
, aVersionSpec versionString , ' of ' , aVersionSpec projectLabel
, '.'.
nil "return nil if resumed" ] in [ :specName |
| spec |
"get project/group/package specs"
spec := aVersionSpec
packageNamed: specName
ifAbsent: [ MetacelloNameNotDefinedError
signal:
'project group, or package named: ' , specName printString
, ' not found when used in requires: or includes: field of package: '
, self name printString , ' for version: '
, aVersionSpec versionString , ' of ' , aVersionSpec projectLabel
, '.'.
nil "return nil if resumed" ].
spec
ifNotNil: [ packageOrProjectSpecs
addAll: (spec resolveSpecsForPackageOrdering: aVersionSpec) ] ] in MetacelloPackageSpec(MetacelloAbstractPackageSpec)>>specs:forPackageOrdering: in Block: [ MetacelloNameNotDefinedError...
[ (self importArray notNil or: [ self import notNil ])
ifTrue:
[ "expect the 'missing' name to be satisfied within context of imported project"
importArray
ifNotNil: [ importArray
do: [ :assoc |
((assoc value includes: aString) and: [ map includesKey: assoc key ])
ifTrue: [ importSpec := (map at: assoc key)
mergeImportLoads: {aString};
yourself ] ].
importSpec ifNotNil: [ ^ importSpec ] ].
(importSpec isNil and: [ self import notNil ])
ifTrue: [ ^ (map at: self import ifAbsent: absentBlock)
mergeImportLoads: {aString};
yourself ] ].
(aString = 'default' or: [ aString = 'ALL' ])
ifTrue: [ self project groupSpec
name: aString;
includes: self packageNames;
yourself ]
ifFalse: [ absentBlock value ] ] in MetacelloMCVersionSpec(MetacelloVersionSpec)>>packageNamed:forLoad:forMap:ifAbsent: in Block: [ (self importArray notNil or: [ self import notNi...etc...
Dictionary>>at:ifAbsent:
Problem is still here.
Oh yes. It's probably because I'm on windows and the archive extraction is not complete since the file names are too long. Sorry for the noise.
That bug is still there ?
Since Metacello uses FileTree, yes. That's one of the main reason for Tonel creation I think.
Since Metacello use FileTree, yes. That's one of the main reason for Tonel creation I think.
I hate those VM bugs. I worked around this limitation in GitFileTree.
Is it really a VM bug? Because even using Windows native explorer I cannot create files with names too long.
As far as I remember, Windows has specific APIs for handling long paths and file names, but the Pharo VM does not use them.
Git does have an option (git config core.longpaths true) for that.
:( can't do any debugging on Pharo 7, one of the core components my environment depends on is broken.
All I could see is that the baseline of Metacello may be missing a dependency (FileTree?).
@estebanlm This is still an open issue. The steps I describe in the opening comment still trigger the error. Besides, I think it's very important to add Pharo 7 to the list of tested releases for Metacello (travis.yml for Metacello).
@estebanlm @dalehenrich It seems this load problem of Grease in Pharo7 is fixed. I'm tackling other Grease issues in Pharo7 at this time (see https://travis-ci.org/SeasideSt/Grease/jobs/406671711).
I do notice Pharo7 is not part of the Travis builds on the Metacello repo. Since Metacello is a major component of the Pharo ecosystem, I hope someone is taking care of this?
@estebanlm @dalehenrich Ouch, revert my latest comment. I was confused. Loading latest Metacello in Pharo7 does not work: https://travis-ci.org/SeasideSt/Grease/jobs/406763661
I can work around the issue on the Grease builds though.