Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SmalltalkCI overrides STON-Core in Squeak trunk #527

Open
theseion opened this issue May 23, 2021 · 4 comments
Open

SmalltalkCI overrides STON-Core in Squeak trunk #527

theseion opened this issue May 23, 2021 · 4 comments

Comments

@theseion
Copy link
Collaborator

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.

@tom95
Copy link
Contributor

tom95 commented May 23, 2021

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.

@theseion
Copy link
Collaborator Author

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

@tom95
Copy link
Contributor

tom95 commented May 24, 2021

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 .properties file. 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 .properties file 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 :)

@theseion
Copy link
Collaborator Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants