On Tue, Jan 6, 2015 at 6:56 PM, Dale Henrichs < 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 >
Loading 1.0 of ConfigurationOfDummyParser... Project: PetitParser 1.51 Project: Glamour development [3.0-baseline] Project: GlamourCore development [3.0-baseline] Fetched -> Glamour-Morphic-Brick-AliakseiSyrel.92 --- http://smalltalkhub.com/mc/Moose/Glamour/main/ --- http://smalltalkhub.com/mc/Moose/Glamour/main/ Project: Rubric development [0.2-baseline] Fetched -> Rubric-AndreiChis.156 --- http://smalltalkhub.com/mc/AlainPlantec/Rubric/main/ --- http://smalltalkhub.com/mc/AlainPlantec/Rubric/main/ Fetched -> Glamour-Morphic-Theme-TudorGirba.195 --- http://smalltalkhub.com/mc/Moose/Glamour/main/ --- http://smalltalkhub.com/mc/Moose/Glamour/main/ Fetched -> Glamour-Morphic-Widgets-AndreiChis.154 --- http://smalltalkhub.com/mc/Moose/Glamour/main/ --- http://smalltalkhub.com/mc/Moose/Glamour/main/ Fetched -> Glamour-Morphic-Renderer-AndreiChis.304 --- http://smalltalkhub.com/mc/Moose/Glamour/main/ --- http://smalltalkhub.com/mc/Moose/Glamour/main/ Fetched -> Glamour-Tests-Morphic-AndreiChis.119 --- http://smalltalkhub.com/mc/Moose/Glamour/main/ --- http://smalltalkhub.com/mc/Moose/Glamour/main/ Fetched -> Glamour-Rubric-Presentations-AndreiChis.35 --- http://smalltalkhub.com/mc/Moose/Glamour/main/ --- http://smalltalkhub.com/mc/Moose/Glamour/main/ Project: Roassal2 for Glamour development [1.1-baseline] Fetched -> Trachel-akevalion.253 --- http://smalltalkhub.com/mc/ObjectProfile/Roassal2/main/ --- http://smalltalkhub.com/mc/ObjectProfile/Roassal2/main/ Fetched -> Roassal2-AlexandreBergel.704 --- http://smalltalkhub.com/mc/ObjectProfile/Roassal2/main/ --- http://smalltalkhub.com/mc/ObjectProfile/Roassal2/main/ Project: Magritte3 release3.2 [3.2.0] Project: Grease release1.1 [1.1.13] Fetched -> Magritte-Pharo3-Model-DiegoLont.3 --- http://smalltalkhub.com/mc/Magritte/Magritte3/main/ --- http://smalltalkhub.com/mc/Magritte/Magritte3/main/ Fetched -> Glamour-Roassal2-Presentations-TudorGirba.33 --- http://smalltalkhub.com/mc/Moose/Glamour/main/ --- http://smalltalkhub.com/mc/Moose/Glamour/main/ Loaded -> Glamour-Morphic-Brick-AliakseiSyrel.92 --- http://smalltalkhub.com/mc/Moose/Glamour/main/ --- cache Starting atomic load Loaded -> Rubric-AndreiChis.156 --- http://smalltalkhub.com/mc/AlainPlantec/Rubric/main/ --- cache Finished atomic load Loaded -> Glamour-Morphic-Theme-TudorGirba.195 --- http://smalltalkhub.com/mc/Moose/Glamour/main/ --- cache Loaded -> Glamour-Morphic-Widgets-AndreiChis.154 --- http://smalltalkhub.com/mc/Moose/Glamour/main/ --- cache GLMMorphicSmalltalkCodeRenderer>>workspaceBindingsStrategy (WorkspaceVariable is Undeclared) GLMMorphicPharoPlaygroundRenderer>>workspaceBindingsStrategy (WorkspaceVariable is Undeclared) Loaded -> Glamour-Morphic-Renderer-AndreiChis.304 --- http://smalltalkhub.com/mc/Moose/Glamour/main/ --- cache Loaded -> Glamour-Tests-Morphic-AndreiChis.119 --- http://smalltalkhub.com/mc/Moose/Glamour/main/ --- cache Loaded -> Glamour-Rubric-Presentations-AndreiChis.35 --- http://smalltalkhub.com/mc/Moose/Glamour/main/ --- cache Loaded -> Trachel-akevalion.253 --- http://smalltalkhub.com/mc/ObjectProfile/Roassal2/main/ --- cache Loaded -> Roassal2-AlexandreBergel.704 --- http://smalltalkhub.com/mc/ObjectProfile/Roassal2/main/ --- cache Loaded -> Magritte-Pharo3-Model-DiegoLont.3 --- http://smalltalkhub.com/mc/Magritte/Magritte3/main/ --- cache Starting atomic load Loaded -> Glamour-Roassal2-Presentations-TudorGirba.33 --- http://smalltalkhub.com/mc/Moose/Glamour/main/ --- cache Finished atomic load ...finished 1.0
Loading 1.0 of ConfigurationOfDummyParser... Project: PetitParser 1.51 Project: Glamour 3.0.0 Project: GlamourCore 3.0.0 Project: Rubric 1.2.2 Project: Roassal2 for Glamour 1.1 Project: Magritte3 release3.2 [3.2.0] Project: Grease release1.1 [1.1.13] Fetched -> Magritte-Pharo3-Model-DiegoLont.3 --- http://smalltalkhub.com/mc/Magritte/Magritte3/main/ --- http://smalltalkhub.com/mc/Magritte/Magritte3/main/ Loaded -> Magritte-Pharo3-Model-DiegoLont.3 --- http://smalltalkhub.com/mc/Magritte/Magritte3/main/ --- cache ...finished 1.0