Do I understand you correctly that the BaselineOfWhiteLabelProduct is a subclass of BaselineOfCoreProduct?

If so, I have no idea what would happen and it certainly has never been tested ... and as I think about this I can see that there would definitely be problems ... I think you are lucky that you ran into problems right off the bat:)

I know that a BaselineOf is a class and folks have been having fun partitioning their BaselineOf "code" into different methods ... but the fact that a BaselineOf is a class was a matter of convenience way back when the only thing that could be versioned was a package and packages only held onto classes ... and with a class, the browser could be leveraged as a tool ...

If STON had existed back then and we had been using a disk based SCM, I would have chosen STON for project specifications instead of a package and a class (as I'm doing today with Rowan) ...

I understand what you are trying to do (I think) and I am (hopefully) addressing what you are trying to do in Rowan, but I'm afraid that you are just be out of luck trying to do this sort of thing with Metacello ...

You might be able to hack a solution that would _appear_ to work by using a shared abstract superclass of both products and include the superclass in both packages ... but I'm afraid that this approach would more than likely just give you a bit more rope to hang yourself with down the road:) ... of course putting the same class in two different packages is problematic all by itself ...

I think that your best bet is to create a single BaselieOf and differentiate your two products with two groups ... I know it's not ideal, but at least this kind of thing has been pretty heavily tested ...

Dale

On 4/24/19 9:24 AM, Norbert Hartl wrote:
I’m trying to customize our current project with multiple baselines meaning 
BaselineOfCoreProduct and BaselineOfWhiteLabelProduct. The latter is a subclass 
of the former. My problem is that I don’t know which way to choose for loading 
because

Metacello new
     baseline: #WhiteLabelProduct
     load

that does not work if BaselineOfCoreProduct is in its own package because that 
is not loaded but the superclass is in there. I saw that I can provide an array 
to baseline: but regardless in which order I put them the wrong is always 
loaded first. So order of the array seem not to matter.


I could still load BaselineOfCoreProduct first and then 
BaselineOfWhiteLabelProduct but I would like to have a better way of doing. I 
could also image putting both baselines in the same package but I don’t know 
how to use Metacello to say it should load a package name and use another named 
Baseline.

Any help appreciated,

Norbert

Reply via email to