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

onUpgrade option for loading project #371

Open
dionisiydk opened this issue Apr 21, 2018 · 6 comments
Open

onUpgrade option for loading project #371

dionisiydk opened this issue Apr 21, 2018 · 6 comments

Comments

@dionisiydk
Copy link

Hi.

I can't find what to put in ston file to tell metacello:

onUpgrade: [:err | err useIncoming]

Is it possible?
Now Calypso is in Pharo 7. And CI does not really loads code because it is already inside Pharo.

@fniephaus
Copy link
Member

I don't think there's an option for this yet. Would you like to add it? :)

@dionisiydk
Copy link
Author

Another idea: should not it be default behaviour?
Because now if you want to test new version of existing project it does not work on CI.

@fniephaus
Copy link
Member

@dalehenrich what do you think? Should we make it the default? And will we still need an option to turn it off?

@tinchodias
Copy link

According to README, this is already supported as an option of SCIMetacelloLoadSpec (https://github.com/hpi-swa/smalltalkCI#scimetacelloloadspec).

However, we tested it in Roassal3+Pharo9 in the same situation that @dionisiydk when reported the issue and the problem wasn't fixed. Not sure 100% what happened but went for other solution.

@fniephaus
Copy link
Member

Thanks for the update, @tinchodias. What "other solution" did you go for? If you could provide some steps to reproduce, we could run smalltalkCI in headful mode and debug the run.

@tinchodias
Copy link

tinchodias commented Sep 24, 2020

That "other solution" was to create preloading .st script that sends removeFromSystem to already loaded packages (not nice but worked... idea taken from Iceberg project).

I think this is not a bug of smalltalk-ci but Metacello. I say that because when Roassal3 is loaded using onUpgrade and onConflict nothing seems to change. To show concretely what I mean, I captured the following screenshot in a fresh Pharo 9 (downloaded today). The following kind of dialog appears for two packages:

Screen Shot 2020-09-24 at 12 09 24

The new packages are loaded correctly only if I click on "Load". The same dialogs appears when you load Metacello without onUpgrade and onConflict... then I suspect these options don't work at Metacello level.


BTW, I just discovered (thanks @akevalion), handling a warning in the following way makes loading work as expected:

[Metacello new
    baseline: 'Roassal3';
    repository: 'github://ObjectProfile/Roassal3';
    load ] on: MCMergeOrLoadWarning do: [:warning | warning load ]

(it loads the code and there is no UI asking anything).

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

No branches or pull requests

3 participants