[Glass] Metacello: getting more info on a project

Dale Henrichs via Glass glass at lists.gemtalksystems.com
Thu Dec 7 14:44:30 PST 2017


Iwan,

Right now there is no API for asking these questions programmatically 
... Personally I simply read the baseline spec to find the answers to 
these questions ... In practice that once you know what groups there are 
you will want to know what packages are in the group and of course the 
answer to all of these questions is that it depends up upon a lot of 
different information (what platform and platform version or you 
interested in ... and so on)...

It may be that a combination of reading the baseline and using the 
`record` command you can extract the information you are looking for. 
The following command works on a baseline (in this case Metacello) that 
is already present in the image:

   Metacello image
     baseline: 'Metacello';
     ignoreImage;                "ignore the state of the current image"
     onWarningLog;             "log Warnings -- as opposed to prompting 
the user"
     record: 'Core'                "use different group names to see 
what happens"

and if you print the result you will something that looks like the 
following:

    linear load :
     linear load : baseline [BaselineOfMetacello]
         load : BaselineOfFileTree
     linear load : baseline [BaselineOfMetacello]
         load : Metacello-Base
         explicit load : Gofer
             load : ConfigurationOfGofer-dkh.45
         atomic load : 1.0.5.4 [ConfigurationOfGofer]
             load : Gofer-Core.gemstone-dkh.138
         load : Metacello-Core
         load : Metacello-MC
         load : Metacello-Platform.gemstone
         load : Metacello-ToolBox
         load : Metacello-Cypress
         explicit load : FileTree
             load : BaselineOfFileTree-dkh.4
         linear load : baseline [BaselineOfFileTree]
             load : MonticelloFileTree-Core
             load : MonticelloFileTree-FileDirectory-Utilities
         load : Metacello-GS3x-Platform
         load : Metacello-FileTree
         load : Metacello-GitBasedRepository
         load : Metacello-GitHub
         load : Metacello-Bitbucket

Dale

On 12/5/17 5:44 AM, Iwan Vosloo via Glass wrote:
> Hello,
>
> I often have questions, such as 'which groups does project X define'. 
> I wonder what are nice ways for me to find out programmatically.
>
> I can, for example do:
>
> (Metacello new
>   configuration:  'Seaside3' ;
>   repository: 'http://www.squeaksource.com/MetacelloRepository';
>   get)
>
> .. and then ask that project stuff, such as its map of versions etc.
>
> What I'd also like to do is to know which groups a project defines, 
> and what packages are in those groups. How do I do this in code 
> starting from (potentially) nothing in my image?
>
>
> Regards
> - Iwan
>
>



More information about the Glass mailing list