[Pharo-users] How to load a single package in a Metacello baseline

Tim Mackinnon tim at testit.works
Tue Feb 19 07:03:07 EST 2019


Yeah - I have a similar issue with ExternalWebBrowser, which I load as:

spec
		baseline: 'ExternalWebBrowser'
			with: [ spec
				repository: 'github://seandenigris/Pharo-Web-Browser:master/repository' ];
		import: 'ExternalWebBrowser'.
		

That drags in BabyMock and huge raft of tests (which I’m grateful were written), but I’d prefer not to muddy the waters when presenting Exercism.

I think what we have to do is submit pull requests to these projects such that they create better baselines with Groups. Eg. The Exercism baseline does this so that students load core, but developers get extra tools to generate exercises - eg.

		spec
				package: 'Exercism'
					with: [ ];
				package: 'ExercismDev'
					with: [ spec requires: #('Exercism' 'ExercismTools')];
				package: 'ExercismTools'
					with: [ spec requires: #('OSProcess' 'ExternalWebBrowser') ];
				group: 'default'
					with:
					#('ExercismTools');
				group: 'dev'
					with:
					#('ExercismDev’)]

Then you can specify in your load request which group to use (I don’t have the syntax handy for baselines, but when you load via iceberg, the Metacelle menu has a second option where you specify the group to use, so I’m sure it can be done in code too).

I’d be interested if there is some way to do it without groups though, so that you don’t have to rely on the package authors to do this (similar in thought to what Sabine is complaining about by not being able to better control version dependencies).

This whole area is becoming more and more important as we grow up and what to have more controllable load characteristics.

Tim

> On 19 Feb 2019, at 11:13, N. Bouraqadi <bouraqadi at gmail.com> wrote:
> 
> Hi,
> 
>  I'm updating the the baseline of PharoJS to use the zinc websockets from the github repo https://github.com/svenvc/zinc <https://github.com/svenvc/zinc>.  I want to load package Zinc-WebSocket-Core.  So, in BaselineOfPharoJS>>#baseline: I've defined 
> spec baseline: 'ZincHTTPComponents' with: [
>                 spec
>                     loads: #('Zinc-WebSocket-Core');
>                     repository: 'github://svenvc/zinc <github://svenvc/zinc>' ].
> 
> However, for some reason I get Zinc-WebSocket-Tests loaded. Any hint how to avoid it?(edited)
> Looking at BaselineOfZincHTTPComponents>>#baseline:, package WebSocket-Core does not seem to depend on tests 
> spec package: 'Zinc-WebSocket-Core' with: [ spec requires: 'Zinc-HTTP' ]
> 
> Thanks,
> Noury

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-users_lists.pharo.org/attachments/20190219/5a31f141/attachment-0001.html>


More information about the Pharo-users mailing list