depending on a group of a BaselineOf
Hi, I'm trying to define a dependency on a group of BaselineOf. specifically #core of github://pharo-graphics/Bloc/src. I've looked at this https://github.com/Metacello/metacello/blob/master/docs/GettingStartedWithGi... which recommends using import:provides: baseline: spec <baseline> spec for: #common do: [ "Sample defines the group 'default'" spec baseline: 'Sample' with: [ spec repository: 'github://dalehenrich/Sample:master' ]. spec import: 'Sample' provides: #('default'). "OtherSample *also* defines the group 'default'" spec baseline: 'OtherSample' with: [ spec repository: 'github://dalehenrich/Sample:master' ]. spec import: 'OtherSample' provides: #('default'). "'default' can now be successfully resolved, even though both projects define the same name" spec package: 'OtherProject-Core with: [ spec requires: 'default' ] ]. However this code is confusing... both Sample & OtherSample provide `default`, so on what does `OtherProject-Core` actually depend? In the examples here https://github.com/Metacello/metacello/blob/master/docs/LockCommandReference... there are groups with the name of the project in them ('External Core' 'External Tests'), but this won't work if I don't control the project I am loading, plus it feels like a hackish workaround. Also, can it be unified with the way ConfigurationOf works? Thanks, Peter
in BaselineOfBasicTools we use something like. spec baseline: 'SUnit' with: [ spec repository: repository. spec loads: #('UI' 'Help')]. -- Pavel 2018-02-26 23:30 GMT+01:00 Peter Uhnák <i.uhnak@gmail.com>:
Hi,
I'm trying to define a dependency on a group of BaselineOf.
specifically #core of github://pharo-graphics/Bloc/src.
I've looked at this https://github.com/Metacello/metacello/blob/master/docs/GettingStartedWithGi...
which recommends using import:provides:
baseline: spec <baseline>
spec for: #common do: [ "Sample defines the group 'default'" spec baseline: 'Sample' with: [ spec repository: 'github://dalehenrich/Sample:master' ]. spec import: 'Sample' provides: #('default').
"OtherSample *also* defines the group 'default'" spec baseline: 'OtherSample' with: [ spec repository: 'github://dalehenrich/Sample:master' ]. spec import: 'OtherSample' provides: #('default').
"'default' can now be successfully resolved, even though both projects define the same name" spec package: 'OtherProject-Core with: [ spec requires: 'default' ] ].
However this code is confusing... both Sample & OtherSample provide `default`, so on what does `OtherProject-Core` actually depend?
In the examples here https://github.com/Metacello/metacello/blob/master/docs/LockCommandReference... there are groups with the name of the project in them ('External Core' 'External Tests'), but this won't work if I don't control the project I am loading, plus it feels like a hackish workaround.
Also, can it be unified with the way ConfigurationOf works?
Thanks, Peter
(I hope this isnât posted twice - I accidentally sent it from an address that wasnât subscribed so this is a repost - apologies) Hi Peter, Iâve never had to use the provides: method even with fairly complex Baselines. This is an example of the kind of thing Iâve been using: baseline: spec <baseline> spec for #common do: [ spec âDependency on project with BaselineOf" baseline: 'Seaside3' with: [ spec loads: #('Core' 'Development' 'Zinc'); repository: 'github://SeasideSt/Seaside:master/repository <github://SeasideSt/Seaside:master/repository>' ]; âDependency on project with ConfigurationOf (note the version)â configuration: âMagritte3â with: [ spec versionString: '3.5.2'; repository: 'http://www.smalltalkhub.com/mc/Magritte/Magritte3/main <http://www.smalltalkhub.com/mc/Magritte/Magritte3/main>' ]; âNow define my project packagesâ package: 'MyProject-Model' with: [ spec requires: #(âMagritte3') ]; package: âMyProject-UI' with: [ spec requires: #('MyProject-Modelâ 'Seaside') ]; package: âMyProject-Tests-Modelâ with: [ spec requires: #('MyProject-Modelâ) ]; âNow define groups for convenience. Groups can load dependencies, packages, or other groupsâ group: âModel' with: #(âMyProject-Modelâ); group: âUI' with: #(âMyProject-UIâ); group: âTestsâ with: #(âMyProject-Testsâ) âMetacello will load the default group unless you specify otherwise" group: âdefaultâ with: #(Modelâ âUIâ); âOther possible convenience groupsâ group: âDevelopmentâ with: #(Modelâ âUIâ âTestsâ); group: âProductionâ with: #(Modelâ âUIâ) ] Then you can load groups like: Metacello new baseline: âMyProjectâ; repository: âgithub://MyGitHubUser/MyProject:master/repository' <github://MyGitHubUser/MyProject:master/repository'> loads: #(âDevelopmentâ); load Hope this helps :) Cheers, Jupiter
On 27 Feb 2018, at 9:30 am, Peter Uhnák <i.uhnak@gmail.com> wrote:
Hi,
I'm trying to define a dependency on a group of BaselineOf.
specifically #core of github://pharo-graphics/Bloc/src.
I've looked at this https://github.com/Metacello/metacello/blob/master/docs/GettingStartedWithGi... <https://github.com/Metacello/metacello/blob/master/docs/GettingStartedWithGi...>
which recommends using import:provides:
baseline: spec <baseline>
spec for: #common do: [ "Sample defines the group 'default'" spec baseline: 'Sample' with: [ spec repository: 'github://dalehenrich/Sample:master' ]. spec import: 'Sample' provides: #('default').
"OtherSample *also* defines the group 'default'" spec baseline: 'OtherSample' with: [ spec repository: 'github://dalehenrich/Sample:master' ]. spec import: 'OtherSample' provides: #('default').
"'default' can now be successfully resolved, even though both projects define the same name" spec package: 'OtherProject-Core with: [ spec requires: 'default' ] ].
However this code is confusing... both Sample & OtherSample provide `default`, so on what does `OtherProject-Core` actually depend?
In the examples here https://github.com/Metacello/metacello/blob/master/docs/LockCommandReference... <https://github.com/Metacello/metacello/blob/master/docs/LockCommandReference...> there are groups with the name of the project in them ('External Core' 'External Tests'), but this won't work if I don't control the project I am loading, plus it feels like a hackish workaround.
Also, can it be unified with the way ConfigurationOf works?
Thanks, Peter
Thank you all... I guess I must have been doing something wrong, because I've tried `loads:` before. But it is working now. Thanks! Peter On Tue, Feb 27, 2018 at 11:56 AM, Jupiter Jones <jupiter.jones@mail.com> wrote:
(I hope this isnât posted twice - I accidentally sent it from an address that wasnât subscribed so this is a repost - apologies)
Hi Peter,
Iâve never had to use the provides: method even with fairly complex Baselines.
This is an example of the kind of thing Iâve been using:
baseline: spec <baseline>
spec for #common do: [ spec âDependency on project with BaselineOf" baseline: 'Seaside3' with: [ spec loads: #('Core' 'Development' 'Zinc'); repository: 'github://SeasideSt/Seaside:master/repository' ]; âDependency on project with ConfigurationOf (note the version)â configuration: âMagritte3â with: [ spec versionString: '3.5.2'; repository: 'http://www.smalltalkhub.com/ mc/Magritte/Magritte3/main' ];
âNow define my project packagesâ package: 'MyProject-Model' with: [ spec requires: #(âMagritte3') ]; package: âMyProject-UI' with: [ spec requires: #('MyProject-Modelâ 'Seaside') ]; package: âMyProject-Tests-Modelâ with: [ spec requires: #('MyProject-Modelâ) ];
âNow define groups for convenience. Groups can load dependencies, packages, or other groupsâ group: âModel' with: #(âMyProject-Modelâ); group: âUI' with: #(âMyProject-UIâ); group: âTestsâ with: #(âMyProject-Testsâ)
âMetacello will load the default group unless you specify otherwise" group: âdefaultâ with: #(Modelâ âUIâ);
âOther possible convenience groupsâ group: âDevelopmentâ with: #(Modelâ âUIâ âTestsâ); group: âProductionâ with: #(Modelâ âUIâ) ]
Then you can load groups like:
Metacello new baseline: âMyProjectâ; repository: âgithub://MyGitHubUser/MyProject:master/repository' loads: #(âDevelopmentâ); load
Hope this helps :)
Cheers,
Jupiter
On 27 Feb 2018, at 9:30 am, Peter Uhnák <i.uhnak@gmail.com> wrote:
Hi,
I'm trying to define a dependency on a group of BaselineOf.
specifically #core of github://pharo-graphics/Bloc/src.
I've looked at this https://github.com/Metacello/ metacello/blob/master/docs/GettingStartedWithGitHub.md#create-baseline
which recommends using import:provides:
baseline: spec <baseline>
spec for: #common do: [ "Sample defines the group 'default'" spec baseline: 'Sample' with: [ spec repository: 'github://dalehenrich/Sample:master' ]. spec import: 'Sample' provides: #('default').
"OtherSample *also* defines the group 'default'" spec baseline: 'OtherSample' with: [ spec repository: 'github://dalehenrich/Sample:master' ]. spec import: 'OtherSample' provides: #('default').
"'default' can now be successfully resolved, even though both projects define the same name" spec package: 'OtherProject-Core with: [ spec requires: 'default' ] ].
However this code is confusing... both Sample & OtherSample provide `default`, so on what does `OtherProject-Core` actually depend?
In the examples here https://github.com/Metacello/ metacello/blob/master/docs/LockCommandReference.md there are groups with the name of the project in them ('External Core' 'External Tests'), but this won't work if I don't control the project I am loading, plus it feels like a hackish workaround.
Also, can it be unified with the way ConfigurationOf works?
Thanks, Peter
participants (3)
-
Jupiter Jones -
Pavel Krivanek -
Peter Uhnák