Metacello: redefine a group for a platform to add an additional package

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Metacello: redefine a group for a platform to add an additional package

Torsten Bergmann
Hi Dale and others:

for the "SimplePersistence" project (see STHub) we need to load a "SimplePersistence-Platform"
project right after the core, but only when we run on Pharo 2.0.

The spec looks like this:


baseline301: spec
<version: '3.0.1-baseline'>

spec for: #common do: [
spec blessing: #'baseline'.
spec description: '- Add Platform package for Pharo 2.0'.
spec repository: 'http://smalltalkhub.com/mc/TorstenBergmann/SimplePersistence/main'.
spec
package: 'SimplePersistence-Core';
package: 'SimplePersistence-Tests' with: [
spec requires: #('SimplePersistence-Core' ). ].
spec
group: 'Core' with: #('SimplePersistence-Core' );
group: 'Tests' with: #('SimplePersistence-Tests');
group: 'CI' with: #('Core' 'Tests');
group: 'default' with: #('Core' ) ].

spec for: #'pharo2.x' do: [
spec package: 'SimplePersistence-Platform' with: 'SimplePersistence-Platform.pharo20'.
spec group: 'default' with: #('SimplePersistence-Platform' ) ].



But when I try in a pharo 2.0#20627 image :

Gofer new
smalltalkhubUser: 'TorstenBergmann' project: 'SimplePersistence';
package: 'ConfigurationOfSimplePersistence';
load

ConfigurationOfSimplePersistence project development spec inspect
 
then the 'default' group is not redefined - and the additional platform package for Pharo 2.0 is not loaded. 
 
Any ideas how to achieve that?
 
Thx
T.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Metacello: redefine a group for a platform to add an additional package

Tudor Girba-2
Hmm. Perhaps groups are not overridden for separate platforms. You could try defining the 'default' group for each separate platform without defining it for #common.

Doru


On Thu, Nov 14, 2013 at 3:59 PM, Torsten Bergmann <[hidden email]> wrote:
Hi Dale and others:

for the "SimplePersistence" project (see STHub) we need to load a "SimplePersistence-Platform"
project right after the core, but only when we run on Pharo 2.0.

The spec looks like this:


baseline301: spec
<version: '3.0.1-baseline'>

spec for: #common do: [
spec blessing: #'baseline'.
spec description: '- Add Platform package for Pharo 2.0'.
spec repository: 'http://smalltalkhub.com/mc/TorstenBergmann/SimplePersistence/main'.
spec
package: 'SimplePersistence-Core';
package: 'SimplePersistence-Tests' with: [
spec requires: #('SimplePersistence-Core' ). ].
spec
group: 'Core' with: #('SimplePersistence-Core' );
group: 'Tests' with: #('SimplePersistence-Tests');
group: 'CI' with: #('Core' 'Tests');
group: 'default' with: #('Core' ) ].

spec for: #'pharo2.x' do: [
spec package: 'SimplePersistence-Platform' with: 'SimplePersistence-Platform.pharo20'.
spec group: 'default' with: #('SimplePersistence-Platform' ) ].



But when I try in a pharo 2.0#20627 image :

Gofer new
smalltalkhubUser: 'TorstenBergmann' project: 'SimplePersistence';
package: 'ConfigurationOfSimplePersistence';
load

ConfigurationOfSimplePersistence project development spec inspect
 
then the 'default' group is not redefined - and the additional platform package for Pharo 2.0 is not loaded. 
 
Any ideas how to achieve that?
 
Thx
T.
 
 



--

"Every thing has its own flow"
Reply | Threaded
Open this post in threaded view
|

Re: Metacello: redefine a group for a platform to add an additional package

Sean P. DeNigris
Administrator
Tudor Girba-2 wrote
Perhaps groups are not overridden for separate platforms
The version was referring to the wrong baseline. I uploaded a new config which correctly loads the Platform package in Pharo 2.0...
ConfigurationOfSimplePersistence-SeanDeNigris.25
- Fix Bug in v. 3.0.1
        - Refer to baseline 3.0.1
        - Declare Core package requires Platform on Pharo 2.0 <-- same behavior when loading the default group, but would've failed to load Platform if someone loaded Core explicitly

Also a small change to the version:
        spec package: 'SimplePersistence-Platform.pharo20' with: 'SimplePersistence-Platform.pharo20-SeanDeNigris.1' ].
became:
        spec package: 'SimplePersistence-Platform' with: 'SimplePersistence-Platform.pharo20-SeanDeNigris.1' ].

From the baseline:
        spec package: 'SimplePersistence-Platform' with: 'SimplePersistence-Platform.pharo20'
sets 'SimplePersistence-Platform.pharo20' as the filename when one loads #bleedingEdge, but the package name is still 'SimplePersistence-Platform'

HTH
Cheers,
Sean