Posted by
Dale Henrichs on
Nov 17, 2011; 6:06pm
URL: https://forum.world.st/collecting-all-packages-of-a-configuration-tp4079913p4080985.html
Mariano,
Which methods were you thinking about?
Dale
----- Original Message -----
| From: "Mariano Martinez Peck" <
[hidden email]>
| To:
[hidden email]
| Sent: Thursday, November 17, 2011 10:04:21 AM
| Subject: Re: [Metacello] collecting all packages of a configuration
|
| Dale, wouldn't make sense to put such helper methods in the version?
|
|
| On Thu, Nov 17, 2011 at 2:57 PM, Dale Henrichs <
[hidden email]
| > wrote:
|
|
| Jannik,
|
| There are two routes you can take to answer your question. Firstly,
| you can directly query the version itself:
|
| ((ConfigurationOfMetacello project currentVersion)
| allPackagesForSpecNamed: 'ALL')
| collect: [:spec | spec file ].
|
| Or you can use #record: and then collect the information you want:
|
| | pkgs loader |
| loader := (ConfigurationOfMetacello project currentVersion)
| ignoreImage: true;
| record: 'ALL'.
| pkgs := OrderedCollection new.
| loader loadDirective packageDirectivesDo: [:directive |pkgs add:
| directive spec file ].
| pkgs.
|
| Dale
|
|
|
| ----- Original Message -----
| | From: "jannik.laval" <
[hidden email] >
| | To:
[hidden email]
| | Sent: Thursday, November 17, 2011 5:11:09 AM
| | Subject: [Metacello] collecting all packages of a configuration
| |
| |
| |
| |
| |
| | Hi guys,
| |
| |
| | With mariano, we had a discussion about a problem I have:
| | How can I collect all packages from a configuration with resolving
| | all sub projects ?
| |
| |
| | Thank you for your help.
| | Cheers,
| | Jannik
| |
| |
| |
| | Begin forwarded message:
| |
| |
| |
| | From: Mariano Martinez Peck <
[hidden email] >
| |
| | Subject: Re: Metacello question
| |
| | Date: November 16, 2011 4:09:38 PM GMT+01:00
| |
| | To: "jannik.laval" <
[hidden email] >
| |
| |
| |
| |
| | On Wed, Nov 16, 2011 at 11:57 AM, jannik.laval <
| |
[hidden email] > wrote:
| |
| |
| |
| |
| | Hi Mariano,
| |
| |
| | I understand your code and It seems to be the same as mine.
| | version40 make the same as "project version: '4.0'".
| |
| |
| | The problem is the resolution of internal projects.
| | We should collect the methods recursively... and possibly with
| | circular dependencies.
| | So, Metacello can resolve them, but I do not know Metacello :(
| |
| |
| |
| |
| | I have no idea :(
| | Ask in metacello mailing list:
[hidden email] ,
| |
| | good luck
| |
| |
| |
| |
| |
| | Jannik
| |
| |
| |
| |
| |
| |
| | On Nov 16, 2011, at 15:36 , Mariano Martinez Peck wrote:
| |
| |
| |
| |
| |
| | On Wed, Nov 16, 2011 at 6:59 AM, jannik.laval <
| |
[hidden email] > wrote:
| |
| |
| | Hi Mariano,
| | How are you ?
| | Here, at Bordeaux, I am fine, and all the family too :)
| |
| |
| |
| | Excellent, nice to hear that :)
| | I am in Argentina in holidays (after Smalltalks) and all familiy
| | good
| | as well hahahahah
| |
| |
| |
| | I have a question about Metacello, and you know well Metacello :)
| | I would like to collect all the files to load of a Configuration
| | with
| | all dependencies already resolved.
| |
| | For now, I have this code in a transcript:
| | ===
| | ConfigurationOfMoose version40 spec packages map select:[:e | e
| | isKindOf: MetacelloPackageSpec ]
| | thenCollect: [:e | e repositories list isEmpty
| | ifTrue: [e file]
| | ifFalse: [e repositories list first name, '/' , e file]].
| | ===
| | It allows me to have all files in ConfigurationOfMoose, but I have
| | two problems:
| |
| | - if I change version40 by version42, I have no more the name of
| | packages.
| | Here is an example:
| | with version40, the first value of my collection is: '
| |
http://www.squeaksource.com/Arki/Arki-Reporter-tg.3 '
| | with version42, it is: '
| |
http://www.squeaksource.com/Arki/Arki-Reporter-Browser '
| | ==> I have no more the versions to load.
| |
| |
| |
| | (ConfigurationOfMoose project version: '4.0') packages collect: [
| | :each | each name ] as: Set.
| |
| | or ..
| |
| | (ConfigurationOfMoose project version: '4.2') packages collect: [
| | :each | each name ] as: Set.
| |
| | does that help ?
| |
| |
| |
| | - the second problem is about depending project. Moose load other
| | projects, and there are some cyclic dependencies between the loads:
| | for example DSM needs Moose, and Moose loads DSM.....
| | I know that Metacello resolves this kind of problems.
| |
| | So, my question is: is it possible to obtain a list of all packages
| | of a configuration ?
| |
| | Thank you
| | ---
| | Jannik Laval
| |
| |
| |
| |
| | --
| | Mariano
| |
http://marianopeck.wordpress.com| |
| |
| |
| |
| |
| |
| |
| |
| |
| | ---
| | Jannik Laval
| |
| |
| |
| | --
| | Mariano
| |
http://marianopeck.wordpress.com| |
| |
| |
| |
| |
| |
| |
| |
| |
| | ---
| | Jannik Laval
| |
| |
| |
| |
| |
| |
| |
| |
| | ---
| | Jannik Laval
| |
|
|
|
| --
| Mariano
|
http://marianopeck.wordpress.com|
|