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
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
Am 24.04.2019 um 19:40 schrieb Dale Henrichs <dale.henrichs@gemtalksystems.com>:
Do I understand you correctly that the BaselineOfWhiteLabelProduct is a subclass of BaselineOfCoreProduct?
Yes as I wrote.
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:)
If tried other ways like complete separate baseline. But referencing all entities from a foreign baseline to reuse is cumbersome.
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 ...
The basic thing I would bewd is to load one package and execute a baseline with a different name.
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 ...
I had something like this but defining the number of packages to load is easy to do in a polymorphic way. I donât have an idea how to achieve this with a group. It is about changing the number of dependencies of one package. So no way of making Metacello load a package with one name and load a baseline with another name? Thanks, Norbert
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
On 4/24/19 3:08 PM, Norbert Hartl wrote:
I donât have an idea how to achieve this with a group. It is about changing the number of dependencies of one package.
There's load order and there's grouping... If you are using #linear loads for a BaselineOf then hard dependencies (Metacello requires:) dictate load order and load order is important. If you are using #atomic loads, then load order for packages is not important ... for #atomic loads you only need to specify which set of packages you want to have loaded together ... so if you have a baseline where you don't use #requires: anywhere and simply define different groups for each set of package to want to have loaded together (one for productA and another for productB) ... you should be able to get what you want ... If this is a public baseline, then you have to warn users of your project that the only legally loadable entities are the set of groups that you've created, then things should work well ... ... I'd think:)
So no way of making Metacello load a package with one name and load a baseline with another name?
Not sure what you are thinking about here ... i think I need a concrete example of what you mean here... Dale
Am 25.04.2019 um 01:13 schrieb Dale Henrichs <dale.henrichs@gemtalksystems.com>:
On 4/24/19 3:08 PM, Norbert Hartl wrote:
I donât have an idea how to achieve this with a group. It is about changing the number of dependencies of one package.
There's load order and there's grouping...
If you are using #linear loads for a BaselineOf then hard dependencies (Metacello requires:) dictate load order and load order is important.
If you are using #atomic loads, then load order for packages is not important ... for #atomic loads you only need to specify which set of packages you want to have loaded together ... so if you have a baseline where you don't use #requires: anywhere and simply define different groups for each set of package to want to have loaded together (one for productA and another for productB) ... you should be able to get what you want ...
If this is a public baseline, then you have to warn users of your project that the only legally loadable entities are the set of groups that you've created, then things should work well ... ... I'd think:)
So no way of making Metacello load a package with one name and load a baseline with another name?
Not sure what you are thinking about here ... i think I need a concrete example of what you mean hereâ¦
Sorry, I wasnât clear. I was talking about the possibility to have a basline loaded where the package name and the name of the baseline are not the same. So letâs say I have the two baselines in the BaselineOfCoreProduct. Then I would need to do something like Metacello new package: âBaselineOfCoreProductâ; baseline: #BaselineOfWhiteLabelProduct; load That would be sufficient. Having all the baselines in one package would be a smaller problem then. Norbert
Dale, looking at my code I really like the idea solving my white label problem with polymorphism. It makes things much easier IMHO. So ended up doing something like having something like this BaselineOfCoreProduct ⦠spec group: âwhiteLabelâ with: #( âBaselineOfWhiteLabelProductâ ) ⦠and doing Metacello new baseline: #CoreProduct load: âwhiteLabelâ; baseline: #WhiteLabelProduct; load This way each baseline is still in its own package. The project is not for public consumption so we have to do that in our deployment process nowhere else. Norbert
Am 25.04.2019 um 09:51 schrieb Norbert Hartl <norbert@hartl.name>:
Am 25.04.2019 um 01:13 schrieb Dale Henrichs <dale.henrichs@gemtalksystems.com>:
On 4/24/19 3:08 PM, Norbert Hartl wrote:
I donât have an idea how to achieve this with a group. It is about changing the number of dependencies of one package.
There's load order and there's grouping...
If you are using #linear loads for a BaselineOf then hard dependencies (Metacello requires:) dictate load order and load order is important.
If you are using #atomic loads, then load order for packages is not important ... for #atomic loads you only need to specify which set of packages you want to have loaded together ... so if you have a baseline where you don't use #requires: anywhere and simply define different groups for each set of package to want to have loaded together (one for productA and another for productB) ... you should be able to get what you want ...
If this is a public baseline, then you have to warn users of your project that the only legally loadable entities are the set of groups that you've created, then things should work well ... ... I'd think:)
So no way of making Metacello load a package with one name and load a baseline with another name?
Not sure what you are thinking about here ... i think I need a concrete example of what you mean hereâ¦
Sorry, I wasnât clear. I was talking about the possibility to have a basline loaded where the package name and the name of the baseline are not the same. So letâs say I have the two baselines in the BaselineOfCoreProduct. Then I would need to do something like
Metacello new package: âBaselineOfCoreProductâ; baseline: #BaselineOfWhiteLabelProduct; load
That would be sufficient. Having all the baselines in one package would be a smaller problem then.
Norbert
Ahhh! Interesting solution to your problem ... funky but using tested features! On 4/25/19 1:23 AM, Norbert Hartl wrote:
Dale,
looking at my code I really like the idea solving my white label problem with polymorphism. It makes things much easier IMHO. So ended up doing something like having something like this
BaselineOfCoreProduct ⦠  spec group: âwhiteLabelâ with: #( âBaselineOfWhiteLabelProductâ ) â¦
and doing
  Metacello new     baseline: #CoreProduct     load: âwhiteLabelâ;     baseline: #WhiteLabelProduct;     load
This way each baseline is still in its own package. The project is not for public consumption so we have to do that in our deployment process nowhere else.
Norbert
Am 25.04.2019 um 09:51 schrieb Norbert Hartl <norbert@hartl.name <mailto:norbert@hartl.name>>:
Am 25.04.2019 um 01:13 schrieb Dale Henrichs <dale.henrichs@gemtalksystems.com <mailto:dale.henrichs@gemtalksystems.com>>:
On 4/24/19 3:08 PM, Norbert Hartl wrote:
I donât have an idea how to achieve this with a group. It is about changing the number of dependencies of one package.
There's load order and there's grouping...
If you are using #linear loads for a BaselineOf then hard dependencies (Metacello requires:) dictate load  order and load order is important.
If you are using #atomic loads, then load order for packages is not important ... for #atomic loads you only need to specify which set of packages you want to have loaded together ... so if you have a baseline where you don't use #requires: anywhere and simply define different groups for each set of package to want to have loaded together (one for productA and another for productB) ... you should be able to get what you want ...
If this is a public baseline, then you have to warn users of your project that the only legally loadable entities are the set of groups that you've created, then things should work well ... ... I'd think:)
So no way of making Metacello load a package with one name and load a baseline with another name?
Not sure what you are thinking about here ... i think I need a concrete example of what you mean hereâ¦
Sorry, I wasnât clear. I was talking about the possibility to have a basline loaded where the package name and the name of the baseline are not the same. So letâs say I have the two baselines in the BaselineOfCoreProduct. Then I would need to do something like
Metacello new   package: âBaselineOfCoreProductâ;   baseline: #BaselineOfWhiteLabelProduct;   load
That would be sufficient. Having all the baselines in one package would be a smaller problem then.
Norbert
participants (2)
-
Dale Henrichs -
Norbert Hartl