Exporting Namespaces
Alan Lovejoy
squeak-dev.sourcery at forum-mail.net
Mon Feb 19 01:40:35 UTC 2007
<Michael van der Gulik> I have an image. In that image is a Namespace. I
need to get that Namespace and the source for the classes in that Namespace
out of that image and in to another image somehow - usually done using e.g.
Monticello, filings stuff out, etc.
The format for SqueakV9.sources, squeak.changes, changesets and file-outs
will have to change a bit if they were to support Namespaces. Rather than
changing the format, another option is to chuck everything out the window
and use a different system, such as keeping the source code and version
information in the image as Text objects. I'm just wanting people's opinions
on the technical merits of the options I mentioned in the root of this
thread. < / Michael van der Gulik>
Ok, thanks for the explanation. I think I now understand your problem.
My suggestion: Namespaces should be constructed by message sends, just like
classes are constructed by message sends. The instructions to create/modify
namespaces should be encoded in a file out as "do it" chunks--again, just
like class definitions. This may not be the ideal solution in the long run,
but it's the only workable/acceptable solution initially.
I would avoid changing the canonical message sends that define classes if at
all possible. If necessary, send additional namespace-related messages to
classes in separate "do it" chunks.
The namespace-related "do it" chunks should silently short-circuit if the
receiving image doesn't support namespaces (although a single warning
message for each file-in might be nice--perhaps a UUID for each file-out
would make that possible.) Or, perhaps your Namespace module could be
auto-installed from SqueakMap or SqueakSource, when needed.
Evolution almost always works a lot better than revolution. Don't fight
against the tide. Go with the flow. When life hands you a lemon, make
lemonade.
--Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20070218/97b1797a/attachment.htm
More information about the Squeak-dev
mailing list
|