Le 28/01/2016 20:55, Dale Henrichs a écrit :
On 01/28/2016 12:50 AM, Thierry Goubier wrote:
Hi Dale,
2016-01-27 15:41 GMT+01:00 Dale Henrichs <dale.henrichs@gemtalksystems.com <mailto:dale.henrichs@gemtalksystems.com>>:
On 1/27/16 12:03 AM, Thierry Goubier wrote:
Hi Dale,
then a question: how does one query a baselineOf or a configOf to retrieve the current project state (i.e. packages) loaded in the image?
Thierry
Thierry,
Good question:)
To start with in tODE I have a class TDMetacelloProjectRegistrationDefinition which is part of the following hierarchy:
Object TDDefinition TDPackageBasedDefinition TDAbstractProjectRegistrationDefinition TDGitProjectRegistrationDefinition TDMetacelloProjectRegistrationDefinition TDMetacelloRegistrationDefinition TDMetacelloBaselineRegistrationDefinition TDMetacelloConfigurationRegistrationDefinition TDMetacelloHybridRegistrationDefinition TDMetacelloUnloadedProjectRegistrationDefinition
The method TDMetacelloProjectRegistrationDefinition>>workingCopies[1] calculates the list of MCWorkingCopy instances for the loaded packages associated with a project (including the configurationof or baselineof... or both).
The key Metacello methods called include:
MetacelloProjectRegistration>>projectVersion[2] MetacelloMCVersion>>packages[3] MetacelloPackageSpec>>workingCopy[4] MetacelloMCProjectSpec>>projectPackage[5]
This is really the key information for doing all of the other operations for a "Project Browser" like "save all dirty packages and commit" and "give me diffs for all dirty packages in project"...
I was just asking that because I'd like to see that information merged as much as possible; separating concepts just strikes me as unneeded complexity, at least for baselines. Not sure what you mean by "separating concepts and unneeded complexity". I provided a picture of some of the abstractions that I am using in tODE ... these abstractions are used in a number of commands, but I also tried to provide you with the basic implementation used in tODE in case you were interested in the fact that tODE includes the BaselineOf package in the list of packages for a project...
This is me trying to express something and being unable to make it clear :) I'll have something at one point later. Or maybe not. Doesn't really matter; I'll wait until it becomes clearer to me.
The simple answer is MetacelloMCVersion>>packages[3]
Thanks. I'll try something.
Configurations are a bit different, since a configuration can snapshot multiple versions. But I'd really like to make it simple and obvious how to setup a project. I'm not sure what you are talking about here.
In Metacello a BaselineOf has a single version and the MetacelloMCVersion class manages the version ... Yes, a Configuration has multiple versions and each of those versions is an instance of MetacelloMCVersion....
Perhaps when you have time, you can provide a bit more information about what you are trying to do ...
I was just looking at it from the angle of having to explain it to one of my students (non-smalltalkers)... The simplest path to creating a project. I guess one must have a tool like Versionner.
I apologize if I provided too much information but when working with folks in different time zones, I am in the habit of packing as much information in a message as possible, because it's often a 24 hour turnaround for responses... (as it is in this case:)
Don't worry about that, you already provided a lot, certainly enough for what I was looking for: a way to organize groups of packages in the image out of the Metacello baselines and configurations present, instead of hacking stuff based on catalog keywords and package name prefix. Now, it's time to implement... If I find that time :( Thierry