[Q] Dependencies of packages
goran.krampe at bluefish.se
goran.krampe at bluefish.se
Tue Jan 13 10:11:01 UTC 2004
Hi Chris!
Here we go again :).
Chris Burkert <chris at chrisburkert.de> wrote:
> Hi
>
> I want to split SmallWiki into separate packages on SqueakMap, so
> that dependent packages will load other automatic. I have
> SmallWiki as Monticello code.
>
> My feelings are that I have to subclass PackageInfo for every
> package, that has to load other packages. Then I can use the
> SarBuilder to create the .sar files, each with a preamble, that
> includes code to load the dependencies. This code I have to write
> by myself in those subclasses of PackageInfo, right?
Eh, personally I don't like that route - but since my planned scheme
isn't available yet I can't shout too loud.
> If there is a better way (SM2?) of simulating dependencies please
> let me know. Below I have put my current real world example:
Well, SM2 which I really, really am deploying any day know (just need a
free day to do it) gives another approach, see below.
> <example>
> I talked with Cees and we decided to separate the Parser so that
> we both can use the same Package from SqueakMap.
>
> I have three packages:
> 1: SmallWiki-Parser
> - the parser which is used by Gardner and SmallWiki
> 2: SmallWiki-Kernel
> - the rest of the SmallWiki code without the parser
> 3: SmallWiki-Base
> - everything that is needed by 1. *and* 2.
>
> So I think to write a PackageInfo for 1. and 2..
>
> The first one (part of the parser) should load SmallWiki-Base
> automatic (if it's not already in the image).
>
> The second one (part of the kernel) should load SmallWiki-Base
> *and* SmallWiki-Parser.
> </example>
My proposed approach is to use loadscripts when SM2 is up and running. I
would then create the three Monticello packages and put them up as .mcz
files on SM. Personally I haven't subclassed PI, not sure when you need
to do that. These three packages would contain no automagic whatsoever -
just plain Monticello packages.
Then I would have created one or more loadscripts for the actual
packages that people will likely want to actively install - none of the
three above are packages that people would select and install on their
own.
The loadscript is just a .st file that would use the SMSqueakMap API to
install the specified releases that you want to install. When I have
deployed SM2 I can give you example code - but it is kinda trivial.
regards, Göran
More information about the Squeak-dev
mailing list
|