Question

In Pharo, I want to define a Metacello's ConfigurationOfNand2Tetris that has just one package:

ConfigurationOfNand2Tetris>>baseline01: spec
  <version: '0.1-baseline'>

  spec
    for: #common
    do: [ 
      spec
        blessing: #baseline;
        repository: 'http://www.smalltalkhub.com/mc/DamienCassou/Nand2Tetris/main';
        package: 'Nand2Tetris' ]

ConfigurationOfNand2Tetris>>development: spec
  <symbolicVersion: #development>

  spec for: #common version: '0.1-baseline'.

When I execute MetacelloToolBox validateConfiguration: ConfigurationOfNand2Tetris I always get 2 warnings:

  • Warning: Symbolic version #development refers to a version'0.1-baseline' whose blessing #baseline is not #development { notDevelopmentVersion } [ #validateVersionSpecForSymbolicVersion:symbolicVersion: ]
  • Warning: Only baseline defined (no version defined). { onlyBaselineVersion } [ #validatePragmas ]
Was it helpful?

Solution

If you want to just depend on a baseline, the metaphor for that in Metacello is to use the #bleedingEdge blessing. Also, you can explicitly deny other symbolic versions:

ConfigurationOfNand2Tetris>>baseline01: spec
  <version: '0.1-baseline'>

  spec
    for: #common
    do: [ 
      spec
        blessing: #baseline;
        repository: 'http://www.smalltalkhub.com/mc/DamienCassou/Nand2Tetris/main';
        package: 'Nand2Tetris' ]

ConfigurationOfNand2Tetris>>bleedingEdge: spec
  <symbolicVersion: #bleedingEdge>
  spec for: #common version: '0.1-baseline'.

ConfigurationOfNand2Tetris>>development: spec
  <symbolicVersion: #'development'>
  spec for: #'common' version: #'notDefined'.

ConfigurationOfNand2Tetris>>stable: spec
  <symbolicVersion: #'stable'>
  spec for: #'common' version: #'notDefined'.

The idea here is that #stable and #development versions link to explicitely enumbered versions, whereas #bleedingEdge always points to the latest versions.

This should avoid the first warning. I think, as long as you do not have released a version, you can safely ignore the second warning.

OTHER TIPS

Usually you'll define your baseline and then also a #versionN: method:

ConfigurationOfNand2Tetris>>version01: spec
  <version: '0.1' imports: #('0.1-baseline')>

  spec
    for: #common do: [ 
      spec
        blessing: #baseline;
        package: 'Nand2Tetris' with: 'Nand2Tetris-yourname.22'].

I think you forgot to implement :

ConfigurationOfNand2Tetris>>version01: spec

<version: '0.1' imports: #('0.1-baseline' )>

spec for: #'common' do: [
    spec blessing: #'development'.
    spec description: 'some description'.
    spec author: 'yourName'.
    spec timestamp: '1/15/2013 16:13'.
    spec  
        package: 'Nand2Tetris' with: 'Nand2Tetris-yourName.versionNumber']

Then you should change :

ConfigurationOfNand2Tetris>>development: spec

  <symbolicVersion: #development>

  spec for: #'common' version: '0.1'.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top