(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');
���Dependency on project with ConfigurationOf (note the version)���
configuration: ���Magritte3��� with: [
spec
versionString: '3.5.2';
���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���;
loads: #(���Development���);
load
Hope this helps :)
Cheers,
Jupiter
Hi,
I'm trying to define a dependency on a group of BaselineOf.
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?
Also, can it be unified with the way ConfigurationOf works?
Thanks,
Peter