baseline merging/importing in BaselineOf

8 views
Skip to first unread message

Johan Brichau

unread,
Mar 6, 2013, 3:42:02 AM3/6/13
to meta...@googlegroups.com
Hi,

I'm experimenting to push our projects to use github, 

In a ConfigurationOf class, it is possible that one baseline imports another baseline using this pragma:
<baseline:'baseline-1.0' imports: #('baselineCommon-1.0')>

In a BaselineOf class, it seems impossible to import a baseline in another baseline because it expects the pragma to be only:
<baseline>

But while investigating the code of Metacello, I got the impression that merging two baselines of a BaselineOf class is indeed possible somehow (i.e. spec merging?)
Anybody has an idea how? Or is it not possible?

Johan

Dale Henrichs

unread,
Mar 6, 2013, 12:45:48 PM3/6/13
to meta...@googlegroups.com
Johan,

The intent of the BaselineOf is that there is really only one baseline: method using the <baseline> pragma ... it doesn't make sense to have multiple versions of a baseline in a git project, because you only have the one set of packages to manage, so my thoughts were that a single baseline method would be sufficient.

Can you give me some more details on what you are trying to do ... I can probably arrange for you to be able to use multiple baselines for composition purposes only, but I'd like to know more of the details first ...

Dale
| --
| You received this message because you are subscribed to the Google Groups
| "Metacello" group.
| To unsubscribe from this group and stop receiving emails from it, send an
| email to metacello+...@googlegroups.com.
| For more options, visit https://groups.google.com/groups/opt_out.
|
|
|

Johan Brichau

unread,
Mar 6, 2013, 1:06:24 PM3/6/13
to meta...@googlegroups.com
Hi Dale,

Our use case is exactly the same as I see in the ConfigurationOfSeaside30, where a baseline imports another 'common' baseline:

baseline306: spec
<version: '3.0.6-baseline' imports: #('3.0.6-baseline-commonBaseline' )>

baseline306commonBaseline: spec
<version: '3.0.6-baseline-commonBaseline'>

We have two baseline methods in our current configuration because, at some point in time, I had to split the baseline into two methods because the compiler complained about too many literals...
So... this issue also applies to the baseline method in a BaselineOf class :-(

Now, I tried to solve my problem with the BaselineOf via composition of two BaselineOf projects:

BaselineOf subclass: #BaselineOfNextPlanCommon

BaselineOf subclass: #BaselineOfNextPlan

where the baseline in BaselineOfNextPlan imports all packages of the NextPlanCommon baseline:

spec
baseline: 'NextPlanCommon';
import: 'ACommonPackage'.

But the load of NextPlan tells me that 'ACommonPackage' name is not found.

Johan

Dale Henrichs

unread,
Mar 6, 2013, 5:41:16 PM3/6/13
to meta...@googlegroups.com
Ahhhh ... the literals problem ... HMMMM ...


As a workaround, you should be able to do the following:

baseline: spec
<baseline>

self baselineNextPlanCommon: spec.
self baselineNextPlan: spec.

and just include the specs in each of the methods without using pragmas ... I normally don't like to encourage calling methods from within specs, but technically it functions the same as an import ... Someday the specs not be executable Smalltalk and doing anything other than calling the "standard baseline messages" will be hard to duplicate.

This should get you going and I'll take the notion of being able to import multiple baselines in a single BaselineOf under consideration ... As I said I don't like to encourage calling arbitrary methods from within a spec, OTOH it _will_ be a bit of work to allow BaselineOfs to use a form of import ...

Regarding creating two BaselineOf ... you _can_ do it that way, but you need to treat each Baseline as a separate project with separate repository, etc. (so you wouldn't use any form of import:) ... this would be way too painful to use in practice ...

My thoughts at the moment center on creating a single BaselineOf per repository/project that manages all of the packages ... I had conveniently forgotten the fact that it is easy to run into the literal limits ....

As an aside, I have anticipated hitting issues like this and consequently I have delayed the formal release of the Preview until I have seen and resolved them:)

I will most likely come up with a form of import that will allow you to segment your baseline over several methods in a single BaselineOf ... but it will take a bit of time before I have a satisfactory solution...

Let me know if the workaround I suggest works for you...

Johan Brichau

unread,
Mar 7, 2013, 5:34:26 AM3/7/13
to meta...@googlegroups.com
Hi Dale,

So easy that I did not even think about that...

thanks!

Johan

Dale Henrichs

unread,
Mar 7, 2013, 3:22:14 PM3/7/13
to meta...@googlegroups.com
Johan,

Haha ... that just means that up until now, my efforts to discourage writing smalltalk in spec methods has succeeded!

Mariano's known the secret for quite awhile now, but I'm afraid that the cat's out of the bag...
Reply all
Reply to author
Forward
0 new messages