Finding class references (Was Re: [squeak-dev] The Trunk: SMLoader-fbs.78.mcz)

Bert Freudenberg bert at freudenbergs.de
Tue Feb 26 15:53:47 UTC 2013


On 2013-02-26, at 16:00, Frank Shearar <frank.shearar at gmail.com> wrote:

> On 26 February 2013 07:21, Frank Shearar <frank.shearar at gmail.com> wrote:
>> :)
>> 
>> I'm working on an InstallerGitHub that will pull in WebClient as
>> needed

WebClient is on Github? What about this:

http://www.squeaksource.com/WebClient.html

> So I have something that will happily load chunk-format files:
> 
> (Installer github user: 'frankshearar' repository: 'Zippers' commitId:
> 'master') install
> 
> pulls a zipball down from github, unzips it and loads all the *.st
> files in that repository.
> 
> Except that I neglected to consider the small detail that since
> RootContext subclasses ZipperContext, I must first load (the file
> containing) ZipperContext before I load (the file containing)
> RootContext, since class initialization will otherwise fail.
> 
> Which leaves me in a mild pickle. I can either resolve the load order
> problem manually - GNU Smalltalk does this, with a package.xml file
> containing the load order (among other things), or I can try identify
> class names in each file and load the files in a topologically sorted
> fashion.
> 
> The former is brain-dead but requires people to write a package.xml
> file. The latter is perhaps easier to use but rather more difficult to
> implement... and possibly fragile.
> 
> Thoughts?

Well, doing the topo sorting automatically sounds good. You may be able to employ MCStReader and MCDependencySorter for that. But then, why not use MC in the first place?

I'm surprised you're not using the MC FileTree package format, which would let Monticello do all its loading magic. See e.g.

https://github.com/bertfreudenberg/gezira/tree/master/bindings/squeak

- Bert -




More information about the Squeak-dev mailing list