[squeak-dev] Loading Xtreams-Xtra into trunk broken

Miguel Cobá miguel.coba at gmail.com
Thu May 5 17:07:53 UTC 2011


El jue, 05-05-2011 a las 09:53 -0500, Chris Muller escribió:
> (If FFI is a
> prerequisite then the script should first check for the presence of
> FFI and, if not, load the appropriate version of that first too).
> 

I raise my hand too and ask why should the script to "check" for the
presence of some other classs/package? Suppose there are packages A, B
and C, maintained by three different persons.

A has no dependencies, so its script (scriptA) just install its mcz
files.

B depends on A and a script for be "checking" that A exists before
installing B. It can have a few implementations:
a) uses the scriptA to install A
b) installs the mcz from B that think it needs, but leave without
install other mcz that doesn't need right now 
c) copies the scriptA into scriptB (copy & paste nightmare when scriptA
is upgraded)

Then comes C maintainer and doesn't know about scriptB it only know that
it needs A and B in order to work. He has a hell lot of options:

1) scriptC install what it thinks it needs from A and from B, leavin
some mcz out.
2) scriptC uses scriptA and uses what it needs from B (because B is a
direct dependeny and know what really needs and what not. Not the same
for A that he doesn't really know and to not fail better install
everything)
3) scriptC copies scriptA and scriptB into scriptC (again copy&paste
hell)

Now you have 3*3 = 9 ways to install C. What a mess.

Metacello instead, permits a configuration to "declares" what it need
"directly" and then it goes and "fulfill" the requiremets for it.

So with metacello. supposing that metacelloConfigA exists, then
maintainer of B can define metacelloConfigB that depends on A.
Lastly, maintainer of C creates metacelloConfigC and "only" depends on
metacelloConfigB and *don't* care about what B depends on. It let B to
decide and metacello to fulfill.

So I think that this whole SqueakMap approach is not going to scale well
in the long term when relying on custom-made scripts without
standarization or order.

Regards
-- 
Miguel Cobá
http://twitter.com/MiguelCobaMtz
http://miguel.leugim.com.mx






More information about the Squeak-dev mailing list