[squeak-dev] Re: [Metacello] Fwd: Metacello questions

Andreas Raab andreas.raab at gmx.de
Fri May 7 04:23:19 UTC 2010


On 5/6/2010 5:26 PM, Dale Henrichs wrote:
> I don't think I've completely answered your questions so we might want to continue the dialog on this question....

We're getting close :-) Let me take my own questions and answer them in 
my own words to see if I understand the issues correctly:

Q1: #includes: vs. #requires:

If I understand correctly what you're saying then, in heavily simplified 
form, I'd say they're both dependencies, except that #requires: is 
loaded before the package it relates to and #includes: afterwords. Thus:

	spec package: 'B' with:[
		spec requires: 'A'.
		spec includes: 'C'.
	].

will load A, B, and C in that order. One thing one can do with this is 
to have mutually dependent packages, for example if package Foo and Bar 
always must be loaded together (Foo before Bar) one would specify:

	spec package: 'Foo' with:[spec includes: 'Bar'].
	spec package: 'Bar' with:[spec requires: 'Foo'].

There is now no way by which Foo or Bar could be loaded without its 
companion. Correct?

Q2: Why is HelpSystem not loaded?

A: That's a bug which I can work around by specifying either #version: 
or #versionString:.

Q3: When exactly is HelpSystem loaded?
A: In the context of my configuration HelpSystem is loaded for two 
reasons: a) because it's a dependency for WebClient-Help and b) because 
no 'default' group has been specified it would be loaded implicitly.

Q4: How does one define dependencies that differ based on platform?
A: I'm not really sure about this. My understanding is that I could use 
#includes: to model the dependency in the "for: #pharo" branch, but one 
question that is still open is whether the following two expressions are 
equivalent:

	spec
		package:'Foo' with:[spec requires: 'Bar'];
		package:'Foo' with:[spec requires: 'Baz'];

and
	spec
		package: 'Foo' with:[spec requires: #('Bar' 'Baz')].

Are these equivalent?

Cheers,
   - Andreas




More information about the Squeak-dev mailing list