On 1/6/15 7:16 AM, Usman Bhatti wrote:
Dale,

I couldn't make it work with the upgraded Metacello and the script you provided.

Steps I did:

1. Download moose image:
https://ci.inria.fr/moose/job/moose-5.0/

2. Update my Metacello to the 'full' version:
Metacello new
  baseline: 'Metacello';
  repository: 'github://dalehenrich/metacello-work:master/repository';
  get.
Metacello new
  baseline: 'Metacello';
  repository: 'github://dalehenrich/metacello-work:master/repository';
  onConflict: [:ex | ex allow];
  load

3. File in the ConfigurationOfDummyParser (see the first message in the thread).

4.  Run this script to downgrade to PetitParser version 1.51

Metacello new
    configuration: 'DummyParser';
    version: '1.0';
    repository: '???';
    onDowngradeUseIncoming: #('PetitParser');
    load.

The desired version is still not loaded, am I missing something here?
Good question, I don't have a lot of time today to spend time trying to reproduce your problem, but if you send me a copy of the Transcript produced while doing the load I might be able to spot the problem ...

regards,

A question: I always use Metacello with ConfigOf and have never used the scripting API myself or saw it being used elsewhere. Can you provide a link that describes the use cases for both: ConfigOf vs. Scripting API?
I've noticed the same thing:)

My "elevator pitch" for the script api goes like this:
1. The scripting api maintains a registry of the actual project versions loaded into the image, making #currentVersion obsolete. #currentVersion is bad because it does a calculation of the current version that can be very slow and sometimes completely incorrect. 2. The old api has rules that it follows when loading projects (i.e., newer projects always win) and there is no mechanism for altering those rules. The scripting api provides mechanisms for for bending those rules to fit your needs ... like allowing a downgrade of a project.

Part of the reason that people haven't changed has to do with how incredibly difficult it is to change the existing inertia. Another part of it is that I continue to support the old way of doing things, so there is no explicit motivation to change.

If you look back 2-3 years in the archives of the Metacello mailing list[1] you should be able to find a number of posts where I make a more detailed cases for the scripting api:)

At the end of the day, it isn't important to me to "get people to use the scripting api," as I said, I continue to support using the old api. I figure that when enough people start asking questions about how to "bend the Metacello rules" that folks will begin to use the "new" scripting api:)

Dale
[1] https://groups.google.com/forum/#!forum/metacello

Reply via email to