metacello
metacello copied to clipboard
Merge versions from a baseline
Hi all,
is this possible or, if not, would it be possible to implement it? For a new project, I'm depending on a number of inbox commits for Squeak that have not yet been merged into the Trunk repository. I would like to specify these commits in my baseline script in order to have them merged when loading my project. However, I cannot use #loads:
for this purpose because this would unload any newer changes committed to the Trunk.
Pseudo code:
package: 'WebClient-Core' with: [
spec
repository: 'https://source.squeak.org/inbox';
file: 'WebClient-Core-ct.127';
operation: #merge]
I also stumbled upon several implementors of `#mergeSpec´, but I did not find out how to use this. Any help would be appreciated, is there any documentation for the complete baseline specification?
I'd rather recommend not relying on inbox-stuff for Metacello. Merge is a tricky operation when done non-interactively (and that is the default/indented/... mode of Metacello).
That said, when working with Monticello-packages, encapsulate them in a ConfigurationOf (not BaselineOf) where you can specify concrete versions of packages, and make them a dependency of your actual BaselineOf
Thank you Tobias,
this sounds reasonable, too; however, when I design my baseline spec to actually downgrade a certain Trunk package, this could introduce problems with the update map (imagine another Trunk package depending on WebClient-Core-xyz.150 (Trunk) which would not work properly after replacing the WebClient package by my older inbox version).
Conceptionally, do I have to fork the entire trunk repository in order to reference it robustly from a baseline? Am I missing a central concept?? :-)
Yes. The base image is taken for granted. And trunk is not a good target for Metacello. It is for installing stuff on released images. Trunk is streaming. Metacello is checkpoints.
I see that. As a workaround, I am using a postLoad script in my baseline and call Installer >> #primMerge:from:
to integrate my pending submissions. If you do not see the need to support merging in baseline specs, feel free to close this issue.
I think there are two orthorgonal topics here:
- Metacello and the moving Trunk (let's talk about that elsewhere)
- Metacello and merging. IMHO it's ok to leave this open for the merging part :)
FYIO, a naive solution for my original desire exists in https://github.com/LinqLover/TelegramSmalltalkBot/blob/2ea661dd88d23084f40e2865d2379570c72d0140/src/BaselineOfTelegramSmalltalkBot.package/BaselineOfTelegramSmalltalkBot.class/instance/installPreviewDependencies.st (also copied with slight variations to https://github.com/LinqLover/TelegramBot and https://github.com/LinqLover/SimulationStudio), which is based on postLoad scripts.
I'm still not very happy with this (see also https://github.com/LinqLover/TelegramSmalltalkBot/issues/15) because it does not use any meta information at all, but if you need a fast solution, you might want to copy this :)