Loading Seaside: adding extensions

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Loading Seaside: adding extensions

timrowledge
Some time back (actually, eek, a year) I was asking about installing Seaside and we had much fun  but eventually made it possible. Now I would like to add the REST package but can't find a clear, working, recipe.

The Seaside repository simply refers to 'loading a group' which seems to be something metacello related. Looking through the classes loaded as part of Seaside I found the class comments for BaselineOfSeaside3 that seem to suggest that using
        BaselineOfSeaside3  project
                load: #('Examples').

is the form to use. Unfortunately trying that with 'REST' fails in MetacelloProject>>#lookupVersion:ifAbsent: - as does the 'Examples' shown.

Further confusing is the way that the #baseline: method seems to expect the REST (and a lot of other stuff) to be loaded by default. Clearly I'm missing some important information her; where is a good explanation that might help?

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Useful random insult:- Immune from any serious head injury.



Reply | Threaded
Open this post in threaded view
|

Re: Loading Seaside: adding extensions

Tobias Pape

> On 09.12.2019, at 21:18, tim Rowledge <[hidden email]> wrote:
>
> Some time back (actually, eek, a year) I was asking about installing Seaside and we had much fun  but eventually made it possible. Now I would like to add the REST package but can't find a clear, working, recipe.
>
> The Seaside repository simply refers to 'loading a group' which seems to be something metacello related.

Yes.

Metacello new
        configuration: 'Seaside3';
        smalltalkhubUser: 'Seaside' project: 'MetacelloConfigurations';
        load: #('OneClick' 'Security' 'Filesystem' 'Email' 'RSS' 'REST').



> Looking through the classes loaded as part of Seaside I found the class comments for BaselineOfSeaside3 that seem to suggest that using
> BaselineOfSeaside3  project
> load: #('Examples').
>
> is the form to use. Unfortunately trying that with 'REST' fails in MetacelloProject>>#lookupVersion:ifAbsent: - as does the 'Examples' shown.
>
> Further confusing is the way that the #baseline: method seems to expect the REST (and a lot of other stuff) to be loaded by default. Clearly I'm missing some important information her; where is a good explanation that might help?

First, I'd still suggest to use the Configuration, the Baseline settles and might be usable but I have only tried the Configuration.

Then, using ConfigurationOf or BaselineOf classes directly might not result in the desired effect.
Using the Metacello class api directly should be safe.

I think the Metacello class itself is best to start looking around.

HTH
Best regards
        -Tobias


Reply | Threaded
Open this post in threaded view
|

Re: Loading Seaside: adding extensions

timrowledge


> On 2019-12-09, at 12:47 PM, Tobias Pape <[hidden email]> wrote:
>
>
> Metacello new
> configuration: 'Seaside3';
> smalltalkhubUser: 'Seaside' project: 'MetacelloConfigurations';
> load: #('OneClick' 'Security' 'Filesystem' 'Email' 'RSS' 'REST').

Ok, that's interesting. Another way to load Seaside and using a different repository - is that kept synched with the github stuff or is it a separate version? This can get somewhat confusing.

It loaded a pile of code including what looks like most of the refactoring browser system. Were you expecting that?


> First, I'd still suggest to use the Configuration, the Baseline settles and might be usable but I have only tried the Configuration.
>
> Then, using ConfigurationOf or BaselineOf classes directly might not result in the desired effect.
> Using the Metacello class api directly should be safe.
>
> I think the Metacello class itself is best to start looking around.

OK, but we collectively have made a real mess of this installing stuff. Baselines, Configurations, Github, squeaksource, smalltalkhub, squeakmap, on and on. Surely the ideal is a nice easy entry on SqueakMap (which we do have for basic Seaside) and then for systems like Seaside a nice easy to use UI and API to load extras.

And I guess I should actually make sure to ask about this on the specific seaside list too, just to be sure.


tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
when people are free to do as they please, they usually imitate each other



Reply | Threaded
Open this post in threaded view
|

Re: Loading Seaside: adding extensions

timrowledge
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; [hidden email]; http://www.rowledge.org/tim
Satisfaction Guaranteed: We'll send you another copy if it fails.



Reply | Threaded
Open this post in threaded view
|

Re: Loading Seaside: adding extensions

Tobias Pape

> On 10.12.2019, at 03:06, tim Rowledge <[hidden email]> wrote:
>
> 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.
>


Yes, ok. Apparently it's safe to use the baseline with Squeak now :D I'm glad!


> 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.

That's true. the panel is not in the 'default' group, so when you do a deployment where you control stuff automated, you don't have to load GUI stuff.


> 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'.

Yep; that's a problem.

Apparently, the baseline still does not have stuff fixed that I once fixed in the Configuration :(
Baaad.


> 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.

If I had time at hand, I'd fix it.
I can't help until new year. Please throw something in my general direction when I don't act then :D

Best regards
        -Tobias


PS: I might have been the sole seaside-on-squeak maintainer for quite some years but time was too tight in the last two years to keep that up. We need one person to do that kind of stuff, really.




Reply | Threaded
Open this post in threaded view
|

Re: Loading Seaside: adding extensions

Tobias Pape

> On 10.12.2019, at 08:31, Tobias Pape <[hidden email]> wrote:
>
>>
>> On 10.12.2019, at 03:06, tim Rowledge <[hidden email]> wrote:
>>
>> 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.
>>
>
>
> Yes, ok. Apparently it's safe to use the baseline with Squeak now :D I'm glad!
>
>
>> 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.
>
> That's true. the panel is not in the 'default' group, so when you do a deployment where you control stuff automated, you don't have to load GUI stuff.
>
>
>> 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'.
>
> Yep; that's a problem.
>
> Apparently, the baseline still does not have stuff fixed that I once fixed in the Configuration :(
> Baaad.

note how this contradicts my earlier statement…
Which planet has this 36h days?

>
>
>> 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.
>
> If I had time at hand, I'd fix it.
> I can't help until new year. Please throw something in my general direction when I don't act then :D
>
> Best regards
> -Tobias
>
>
> PS: I might have been the sole seaside-on-squeak maintainer for quite some years but time was too tight in the last two years to keep that up. We need one person to do that kind of stuff, really.



Reply | Threaded
Open this post in threaded view
|

Re: Loading Seaside: adding extensions

timrowledge
In reply to this post by Tobias Pape
Hi Tobias
(apologies for the delayed response)

> On 2019-12-09, at 11:31 PM, Tobias Pape <[hidden email]> wrote:
>
> That's true. the panel is not in the 'default' group, so when you do a deployment where you control stuff automated, you don't have to load GUI stuff.

It's really more of a Metacello thing I guess, but it's really a bit odd to have a system where no arguments does a default  load of 'most things' (by some developers definition of 'most' etc) and having an argument loads only the argument unless it has dependencies... I suppose it will make sense someday.

>
> If I had time at hand, I'd fix it.
> I can't help until new year. Please throw something in my general direction when I don't act then :D
>
> Best regards
> -Tobias
>
>
> PS: I might have been the sole seaside-on-squeak maintainer for quite some years but time was too tight in the last two years to keep that up. We need one person to do that kind of stuff, really.

Wow, I had no idea. That really needs addressing. I can try to do some stuff but there's a colossal pile of porting to do for actual-work plus of course all the other stuff. Where did you say you are buying your 36hr days?

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Compatible: Gracefully accepts erroneous data from any source.



Reply | Threaded
Open this post in threaded view
|

Re: Loading Seaside: adding extensions

Tobias Pape

> On 14.12.2019, at 00:18, tim Rowledge <[hidden email]> wrote:
>
> Hi Tobias
> (apologies for the delayed response)
>
>> On 2019-12-09, at 11:31 PM, Tobias Pape <[hidden email]> wrote:
>>
>> That's true. the panel is not in the 'default' group, so when you do a deployment where you control stuff automated, you don't have to load GUI stuff.
>
> It's really more of a Metacello thing I guess, but it's really a bit odd to have a system where no arguments does a default  load of 'most things' (by some developers definition of 'most' etc) and having an argument loads only the argument unless it has dependencies... I suppose it will make sense someday.

Yea. I found it useful, tho.
I should find time somewhen to draw all this dependency stuff as a nice connector graph or so.
would make things clearer.

>
>>
>> If I had time at hand, I'd fix it.
>> I can't help until new year. Please throw something in my general direction when I don't act then :D
>>
>> Best regards
>> -Tobias
>>
>>
>> PS: I might have been the sole seaside-on-squeak maintainer for quite some years but time was too tight in the last two years to keep that up. We need one person to do that kind of stuff, really.
>
> Wow, I had no idea. That really needs addressing. I can try to do some stuff but there's a colossal pile of porting to do for actual-work plus of course all the other stuff. Where did you say you are buying your 36hr days?

Mercury? Saturn? Somewhere where the air tastes metallic, at least…
        -t

>
> tim