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

Add baseline reference to a changeset file? #528

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

Add baseline reference to a changeset file? #528

LinqLover opened this issue Oct 6, 2020 · 5 comments

Comments

@LinqLover
Copy link
Collaborator

Hi,

not sure whether this is the right place for such a question/feature request, but in my BaselineOfMyWonderfulProject, I'd like to specify the requirement of a package to a changeset file that is available via an HTTP(S) server. Does Metacello support this? Is there any list of the supported repository formats?

Pseudocode would be something like this:

baseline: spec
	<baseline>
	spec for: #common do: [
		spec
			package: 'ShoutAttribute' with: [
				spec repository: 'https://gist.githubusercontent.com/LinqLover/f2a0a189a00aa1484b481c805629e517/raw/e7850041758e02a536a0e32b54bf0b99785bebc3/ShoutAttribute.cs'].
		spec
			package: 'MyWonderfulPackage' with: [
				spec requires: #('ShoutAttribute')]].

Or is this generally impossible because changesets do not provide any necessary metadata?

@fniephaus
Copy link
Contributor

Can't something like this be done in a postLoad method?

@krono
Copy link
Collaborator

krono commented Oct 7, 2020

AFAIK this can be done with a specifc subclass in metacello.
There are such things for filetree+git, http+monicello, files+monitcello etc;
The filetree/cypress variant also works with cuis (https://github.com/CampSmalltalk/cuis-cypress).

There might be too many ways to do that and potentially none of the really feasible 🤪

@LinqLover
Copy link
Collaborator Author

Can't something like this be done in a postLoad method?

Hypothetically, yes, but 1) I would consider it more convenient if Metacello could handle all the required connection and filein logic, and 2) I would need to check in my postLoad whether the requiring package has actually been loaded. Imagine a third package in the baseline above, spec package: 'MyGreatPackage' which does not require 'ShoutAttribute', so the changeset should also not be installed when only loading 'MyGreatPackage'.

AFAIK this can be done with a specifc subclass in metacello.

But maybe with the difference that git, Monticello, etc. all specify some amount of version information? Just asking, I am not familiar with the source at all. :-)

@ThierryGoubier
Copy link

ThierryGoubier commented Oct 7, 2020 via email

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

4 participants