[Glass] Metacello: getting more info on a project

Dale Henrichs via Glass glass at lists.gemtalksystems.com
Mon Dec 11 12:00:13 PST 2017



On 12/9/17 12:07 AM, Iwan Vosloo via Glass wrote:
> Hi Dale,
>
>
> On 08/12/2017 00:44, Dale Henrichs via Glass wrote:
>> 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)...
>
> Thanks. Being able to interrogate what Metacello found via tha API 
> would be great... ;-) Then I dont have to rely on my interpretation of 
> the code in someone else's BaselineOf/ConfigurationOf. That code can 
> be structured in multiple ways and cater for all kinds of advanced 
> corner cases. It would be nice not to have to read it...and thus to 
> have had to master a bigger chunk of the learning curve of Metacello 
> just to be able to pull in (possibly complex) projects of others.
I understand and reflecting on this I realize that I was probably 
thinking about the general case where you might want to ask the 
question: "what groups are there for the Seaside project for Pharo6.1" 
... while in GemStone ... if you narrow the scope of the question to: 
"what groups are available for the platform I'm running on" ... then I 
think it is not that difficult to supply a workspace to produce the list 
of groups available for the current platform given a BaselineOf:

   | project groupNames |
   project := BaselineOfMetacello new project.
   groupNames := Set new.
   (project map at: 'baseline') spec
     specListProjectDo: [ :projectSpec |  ]
     packageDo: [ :packageSpec |  ]
     groupDo: [ :groupSpec | groupNames add: groupSpec name ].
   groupNames

you can see that it is possible to garner information about the names of 
dependent projects and packages as well ...

Dale


More information about the Glass mailing list