[Pharo-project] [Metacello] Fwd: Metacello questions

Dale Henrichs dale.henrichs at gemstone.com
Thu May 6 20:26:47 EDT 2010

----- "Andreas.Raab" <andreas.raab at gmail.com> wrote:

| 3) When exactly is HelpSystem loaded?
| What I'm wondering about in the above is that HelpSystem should only
| be
| loaded if WebClient-Help is being loaded. Is this implicitly part of
| specifying a 'project' instead of a 'package'? Or is there some other
| way of specifying that?
| I guess really the question here is what entities get loaded
| implicitly
| simply by declaring them (packages for sure, any others?) and what
| entities need to be 'required' in order to be loaded?


Here's the Transcript from a (successful) load of WebClient:

Loading 1.0 of ConfigurationOfWebClient...
Fetched -> ConfigurationOfHelpSystem-tbn.12
Loaded -> ConfigurationOfHelpSystem-tbn.12
Fetched -> WebClient-Core-ar.15 
Fetched -> WebClient-Tests-ar.7
Fetched -> WebClient-HTTP-ar.1 
Project: HelpSystem
Fetched -> HelpSystem-Core-tbn.40
Fetched -> HelpSystem-Tests-tbn.9 
Fetched -> Pharo-Project-Help-tbn.8 
Fetched -> WebClient-Help-ar.4 
Fetched -> WebClient-Pharo-ar.1 
Starting atomic load
	Loaded -> WebClient-Core-ar.15 
	Loaded -> WebClient-Tests-ar.7 
	Loaded -> WebClient-HTTP-ar.1 
Finished atomic load
Loaded -> HelpSystem-Core-tbn.40
Loaded -> HelpSystem-Tests-tbn.9
Loaded -> Pharo-Project-Help-tbn.8
Starting atomic load
	Loaded -> WebClient-Help-ar.4
	Loaded -> WebClient-Pharo-ar.1
Finished atomic load
Evaluated -> 1.1 [ConfigurationOfHelpSystem] >> openHelpBrowser

In your configuration you had specified that WebClient-Help required the Help System, so you can see that the load of the Help System was inserted at that point in the load (which is what triggered the bug, too).

The order of specifying packages/projects implies the order that things will be loaded in. With #requires:, the load order is explicit. 

I would recommend that you explicitly use #requires: unless only one or two packages are involved. 

The implicit load order is not obvious when you introduce conditional loading (with #squeakCommon #squeak, and #pharo), so if load order matters I would explicitly declare the relationships.

The other aspect besides load order is what you want loaded. By default all packages/projects are loaded, but you can define a 'default' group which would be used to specify a subset of the packages/projects that are loaded by default. This is useful if you want to control whether or not a set of packages (say tests) are loaded or not ... 

I don't think I've completely answered your questions so we might want to continue the dialog on this question....


More information about the Pharo-dev mailing list