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

Merge versions from a baseline #530

Open
LinqLover opened this issue Oct 8, 2020 · 6 comments
Open

Merge versions from a baseline #530

LinqLover opened this issue Oct 8, 2020 · 6 comments

Comments

@LinqLover
Copy link
Collaborator

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?

@krono
Copy link
Collaborator

krono commented Oct 8, 2020

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

@LinqLover
Copy link
Collaborator Author

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?? :-)

LinqLover added a commit to LinqLover/TelegramBot that referenced this issue Oct 8, 2020
Works around feature request described in Metacello/metacello#530
@krono
Copy link
Collaborator

krono commented Oct 8, 2020

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.

@LinqLover
Copy link
Collaborator Author

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.

@krono
Copy link
Collaborator

krono commented Oct 8, 2020

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 :)

LinqLover added a commit to LinqLover/TelegramBot that referenced this issue Oct 12, 2020
- Add GitHub Action workflow (`.github/workflows/main.yml`) to run tests using smalltalkCI (`.smalltalk.ston`)
- Make integration tests CI-ready by providing:
  * secret variables for bot and client (they also have been defined in the [repository settings](https://github.com/LinqLover/TelegramBot/settings/secrets))
  * a test database for TelegramClient (see `assets/tests/tdlib.zip.gpg`) that works out of the box without using a new authentication code. It is encrypted using another secret variable.
  * revising the `TelegramBotIntegrationTest` running logic to make it more robust and fail-safe
- Fix baseline and specify missing dependencies
  * Create an extra package (`TelegramBot-Support-ShoutAttribute`) for extensions depending on the not-yet-released `ShoutAttribute` changeset (4680c53)
  * Add `BaselineOfTelegramBot >> #installPreviewDependencies` to install other not-yet-released proposals for the Squeak Trunk (works around Metacello/metacello#528 and Metacello/metacello#530)
  * Depend on [fork](https://github.com/LinqLover/TelegramClient) of [TelegramClient](https://github.com/hpi-swa-teaching/TelegramClient) until hpi-swa-teaching/TelegramClient#311, hpi-swa-teaching/TelegramClient#312 have been merged (528ae9a)
  * Add missing and remove superfluous extension methods
- API: Revise offset computation for getUpdates method (89c79a0)
- Fix `TelegramBotRequest >> #testSendAudio` (305755e)
- Add badges to `README.md` (7621356)
@LinqLover
Copy link
Collaborator Author

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 LinqLover/TelegramSmalltalkBot#15) because it does not use any meta information at all, but if you need a fast solution, you might want to copy this :)

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

No branches or pull requests

2 participants