How to define a ConfigurationOf with a #development version that depends on a baseline?

metacello, pharo, smalltalk, squeak

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.

Problem

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 ]

Original source