[squeak-dev] Loading Seaside: adding extensions

tim Rowledge tim at rowledge.org
Tue Dec 10 02:06:47 UTC 2019


This gets more and more 'fun'.

The SqueakMap load file - which works nicely to load a basic Seaside - says 
================
 Installer ensureRecentMetacello.

(Smalltalk at: #Metacello) new
 baseline:'Seaside3';
 repository: 'github://SeasideSt/Seaside:master/repository';
 load.

(Installer ss3 project: 'WebClient')
        install: 'WebClient-Seaside-Adaptor'.

"Optionally use the control panel to add adaptor, start and to set encoding"
"WAControlPanel open."

"do the above but without using the GUI"
((Smalltalk at: #WAWebServerAdaptor) port: 8080)
        codec: ((Smalltalk at: #GRCodec) forEncoding: 'utf-8');
        start.
================
Now, the bare load from github loads stuff ok. It doesn't include the REST stuff that started this latest adventure but it is a working Seaside that you can connect to and get the relevant pages.

So I ran through the process in a debugger to see what is going on, which is a rather convoluted process that at one point leads to the #load which goes to #load: and the argument is  expected to be a list of package names. At least, so far as I can tell. The documentation I've found so far for metacello isn't exactly helpful. The actual HelpPage installed is dreadful.

It looked like maybe I should mimic the idea Tobias suggested, using #load: #('REST') in the hope it would add that to the packages to load. It seemed to run ok and indeed loaded the REST packages. What it *didn't* do is load much of the rest (hur-hur) of the system, so I had no WAControlPanel, for example. I have to imagine that what happened is that only the things the REST explicitly relies upon got loaded. That leaves us needing all those other parts. 
I tried another run with #load:('OneClick' 'REST') - again, mimicking Tobias' suggestion - but that crashed out with the curious complaint that it couldn't find a class named 'Zinc'. Well, I mean 'duh' this is Squeak.
So I tried a plain #load again, in the hope it might add in the default stuff; and it seems to have done that. 


The question I have how to cleanly load the basic system and the REST (and maybe other stuff later, who knows) reliably. Do we go with sometihng like
(Smalltalk at: #Metacello) new
 baseline:'Seaside3';
 repository: 'github://SeasideSt/Seaside:master/repository';
 load;
load: #('REST').
... for example? That seems rather cumbersome to say the least. I tried that out for completeness' sake and it does appear to have worked, so there's that.



tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Satisfaction Guaranteed: We'll send you another copy if it fails.




More information about the Squeak-dev mailing list