smalltalkCI
smalltalkCI copied to clipboard
SmalltalkCI overrides STON-Core in Squeak trunk
Squeak trunk (5.4) can't currently load any code. The reason for this appears to be a name clash of STON-Core. Squeak now comes with its own version of STON (https://github.com/squeak-smalltalk/squeak-ston) which includes a class names STONJSON which is need to load code from Tonel repositories. SmalltalkCI inadvertently replaces this package, thus removing STONJSON.
I suspect the SmalltalkCI baseline needs to be updated for 5.4 to exclude the STON package.
Hey @theseion, do you have a link to a failing build to inspect? Generally, Squeak-trunk builds still work (or better: I just had one pass). STON has been added as a dependency of Metacello on Squeak a little while ago, to be able to read the .properties files so that it can identify when the Tonel format is in use.
Sure: https://travis-ci.org/github/theseion/Fuel/jobs/772071007.
I just rechecked that I didn't mess up and indeed, loading the SmalltalkCI baseline from a freshly updated Squeak trunk image has the effect of replacing the STON package:
Metacello new
repository: 'filetree:///Users/cthulu/dev/git/smalltalkCI/repository';
baseline: 'SmalltalkCI';
load
After some digging I came up with this: the core problem is that smalltalkCI for Squeak bundles its own STON, which overrides the more up-to-date version of STON installed by Metacello during bootstrapping.
A couple of factors are coming together here so that the error only rarely manifests:
- Many projects we maintain for Squeak still have the #useLatestMetacello flag set, which should not be necessary but more often than not fixed problems (as also encountered here). When Metacello is loaded again after smalltalkCI, we get the up-to-date STON again.
- Few projects have a
.propertiesfile. Only if that file exists, the broken code path is hit - Pre-trunk images still bundle an old version of Metacello that does not check for the
.propertiesfile and thus does not need STON
The simplest fix might be something like this in smalltalkCI's squeak baseline:
Smalltalk at: #STON ifAbsent: [
spec
package: 'STON-Core';
package: 'STON-Tests'
" and then also adapt the dependencies accordingly "
but I'm not sure if this is necessarily good style.
The proper fix would most likely be to drop the version of STON that is bundled in smalltalkCI and ensure that we always load the most recent Metacello that comes with STON. As the images for squeak <=5.3 are cached we might even be able to just do the proper fix without incurring any damages. Gemstone and Pharo appear not to depend on the bundled STON but I would have to double check before removing anything for good :)
Thanks Tom. I think fixing the baseline is the proper way to go. We already have a similar strategy for Pharo. I've opened a PR with a proposed fix.