Kilon,
Thierry's solution is the preferred one ... I know that a lot of people
are inclined to insert arbitrary Smalltalk code into specifications, but
one should pretty much stick to the spcification-based solution and
avoid including arbitrary Smalltalk ... including a load like you have
may "work" but if any issues start showing up (and they are likely to
eventually) I won't be able to help you ...
If one uses git/github, it should be completely unnecessary to have a
ConfigurationOf at all ... as the combination of a BaselineOf and git
covers all of the bases ...
Thierry is correct that a BselineOf can be used with a non-git
repository, but if you take that approach you will always load the
bleeding edge and there will be no way to put a stake in the ground with
respect to a certain fixed version. Git gives you the SHA and tags to
identify a specific version.
Dale
On 3/17/15 4:55 AM, Thierry Goubier wrote:
Hi Kilon,
I think you can simply do:
baseline: spec
<baseline>
spec
for: #pharo
do: [
spec baseline: 'SmaCC' with: [ spec repository:
'github://ThierryGoubier/SmaCC' ].
spec package: 'Ephestos' with: [ spec requires: #('SmaCC') ] ]
You can also restrict what you load from SmaCC in this way:
baseline: spec
<baseline>
spec
for: #pharo
do: [
spec baseline: 'SmaCC' with: [ spec repository:
'github://ThierryGoubier/SmaCC' ].
spec import: 'SmaCC'.
spec package: 'Ephestos' with: [ spec requires: #('SmaCC-Python') ] ]
(i.e. by importing the baseline of SmaCC, you can choose among the
groups or the packages of SmaCC...)
From what Dale told me, you can only import one baseline this way. But
you can add from more than one baseline with import: provides:
baseline: spec
<baseline>
spec
for: #pharo
do: [
spec baseline: 'SmaCC' with: [ spec repository:
'github://ThierryGoubier/SmaCC' ].
spec import: 'SmaCC' provides: #('SmaCC-Python').
spec package: 'Ephestos' with: [ spec requires: #('SmaCC-Python') ] ]
Dale, is that correct? I haven't tested those, so...
Note that any kind of repository can host a baseline this way,
smalltalkhub, squeaksource, etc...
version05: spec
<version: '0.5'>
spec
for: #'pharo4.x'
do: [
spec
baseline: 'GitFileTree'
with: [ spec repository:
'http://smalltalkhub.com/mc/ThierryGoubier/GitFileTreePharo40/main' ];
import: 'GitFileTree' ]
And of course a baseline can require a configuration...
I'm still exploring all the possibilities this allows (and, more
important, how configurations may be simplified to defer effective
loading to a baseline inside the master repository, so that the
configuration very rarely has to be updated).
Thierry
2015-03-17 12:11 GMT+01:00 kilon alios <kilon.al...@gmail.com
<mailto:kilon.al...@gmail.com>>:
I have this very simple baseline for Ephestos
baseline: spec
<baseline>
spec
for: #pharo
do: [
spec package: 'Ephestos' with: [Metacello new
baseline: 'SmaCC';
repository: 'github://ThierryGoubier/SmaCC';
load] ].
The above code works fine for me. The user can install Ephestos
from configuration browser that has a configuration that loads
this baseline which in turn not only loads the latest code for the
project but also runs this block to make sure Smacc is installed
for Ephestos to use.
The question however how else I can do this and what are the
advantages and disadvantages for those other approaches ?