Question

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' ].
Was it helpful?

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.

OTHER TIPS

You could, but probably don't want to. The consequence of doing what you suggested above, is that you are creating a snapshot that can no longer be patched. [Snapshot versions should not be in a configuration. They are a separate concept, needing their own class]. With about the same amount of effort, you can take a look at the changes that were made in version 126, and make sure you get those.

If you open the repository with the monticello browser, you select version 126 and then history. Select version 125 in the history, and view changes in the context menu. There you see that default was changed (and a new baseline was added). If you now make default (or stable) dependent on your needs, you can save a new version of the configuration. Just make sure you make the change in the latest version.

spec for: #'common' version: '2.1'.
spec for: #'pharo1.3.x' version: '2.2'.
spec for: #'pharo1.4.x' version: '2.4'.
spec for: #'pharo2.x' version: '2.5'.
spec for: #'pharo3.x' version: '2.6-snapshot'.

[edit] If the issue is closed with WontFix, that often means not enough time to do all the work to fix it. You can get better results by showing that the fix works for your needs, and preferably also the latest image using this code. So just make this change in a local package (in a clean image) and try it. If you can report that it works, I'll make the change :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top