Search code examples
smalltalkpharomonticellometacello

Can i require a specific commit of another Metacello ConfigurationOf in my Metacello configuration?


In the baseline of ConfigurationOfMyProject i require project Something:

spec project: 'Something' with: [
   spec
      className: 'ConfigurationOfSomething';
      repository: 'http://smalltalkhub.com/mc/SomeOne/Something/main';
      versionString: '1.0' ].

The maintainer of ConfigurationOfSomething committed a new version of ConfigurationOfSomething that contains a bug. So my ConfigurationOfMyProject does not load anymore.

Can i require a specific version of ConfigurationOfSomething like:

spec project: 'Something' with: [
   spec
      className: 'ConfigurationOfSomething';
      repository: 'http://smalltalkhub.com/mc/SomeOne/Something/main';
      monticelloVersion: 'ConfigurationOfSomething-SomeOne.125'
      versionString: '1.0' ].

Solution

  • Yes, you can use the #file: message to force loading a specific version.

    spec project: 'Something' with: [
       spec
          className: 'ConfigurationOfSomething';
          file: 'ConfigurationOfSomething-SomeOne.125'; 
          repository: 'http://smalltalkhub.com/mc/SomeOne/Something/main';
          versionString: '1.0' ].
    

    See the Metacello API for an overview.