Usman,

No, I appreciate your patience:) If creating your own configuration works for you then that is a good route to go...

Sharing your image will make it much easier for me to get the bottom of this (on my own schedule:), so please send me a link for accessing your image and I'll dig into this in more detail when I have time ...

If you find yourself stuck and needing the `downgrade directive` again, I'll bump up the priority ...

Dale

On 01/07/2015 09:19 AM, Usman Bhatti wrote:


On Tue, Jan 6, 2015 at 6:56 PM, Dale Henrichs <dale.henri...@gemtalksystems.com <mailto:dale.henri...@gemtalksystems.com>> wrote:


    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 ...


It looks to me that the downgrade command is not working. Whenever I point to the version preceding the one loaded, the packages are not fetched.

I am attaching here two files.

The first (Transcript-PP151) is the output of the transcript as you asked. You can see that PetitParser packages as defined by the version 1.51 are not fetched. All that is loaded is Glamour because the version 1.51 of PetitParser loads the latest packages of Glamour. The load works because it is an upgrade from the current version of Glamour which is a stable.

When I saw that only Glamour packages are loaded, I thought of testing Glamour downgrade too to see if the problem is specific to PetitParser. You can see the result in the second file (Transcript-downgrade-glamour). No packages of Glamour are fetched because the configuration tries to downgrade it (stable is more recent than 3.0.0 which I try to load).

In my opinion, downgrade is not working as required. If you want I can share my image thru dropbox so that you can have a look to see what might be wrong.



    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:)


So, what I learn is that I am trying to bend the rules of Metacello which is a rare use case :). I am thinking of avoiding this downgrading altogether by forking to create my own ConfigOf that loads the correct versions. Downgrading might be an anti-pattern.

Thank you for your patient so far :)

regards.


    Dale
    [1] https://groups.google.com/forum/#!forum/metacello
    <https://groups.google.com/forum/#%21forum/metacello>



Reply via email to