[Seaside] [squeak-dev] About loading Seaside into Squeak6.0a-17082 ....
H. Hirzel
hannes.hirzel at gmail.com
Thu Apr 27 09:01:25 UTC 2017
Hello Tobias
Your hint [1] and the remarks by Esteban and Dale allowed me to load
Seaside into a Squeak6.0alpha-17082 image (points a and b below) and
the most recent Squeak6.0alpha-17227 (point c below) with some
workarounds.
a) I had to patch [2]
MetacelloSqueakPlatform>>defaultPlatformAttributes
in a way so that it gives the same result as in Squeak 5.1 where
everything works fine [3]
b) Before opening the Seaside control panel (World menu / open) I had
to call the following
initialisation code manually.
WAServerManager initialize.
WAKeyGenerator initialize.
WAResponse initialize.
With this the initial Seaside screen came up and I could create a
component
and browse the examples.
Maybe there are more objects to initialize, however the tests (see
point c) seem to
indicate that it is probably sufficient.
It seems that some startup / initialisation code does not get
registered / called after loading.
c) Points a) and b) are for Squeak6.0alpha-17082 and for Squeak
6.0alpha-17227 (= the most
recent one).
So this point is about what you have to do in addition to make
Seaside load in
Squeak 6.0alpha-17227.
In Squeak6.0alpha-17082 we still have the class BlockContext.
In the more recent versions (current is 17227)
the classes BlockContext and ContextPart are no longer in the
image. Only Context.
To load MetaCello you need to add a (temporary) subclass to context
Context variableSubclass: #BlockContext
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: 'Kernel-Methods'
And for Seaside to load
Context variableSubclass: #ContextPart
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: 'Kernel-Methods'
With this workaround Seaside loads fine and when I run all tests in
categories starting with 'Seaside-Tests-' then I get 914 passes out
ot 915. [4]
Conclusion:
----------------
It seems that there are no changes in Squeak6.0a so far which are
show stoppers for Seaside.
The current result is fine for me at the moment and I will look into
this issue later in the release cycle of Squeak 6.0a. The remarks by
Dale will be helpful to do so.
Esteban, Dale and Tobias, thank you for your help.
Regards
--Hannes
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
[1] defaultPlatformAttributes
On 4/26/17, Tobias Pape <Das.Linux at gmx.de> wrote:
[snip]
>
> Hannes, since I have not much time atm for Seaside, can you try out a bit
> yourself?
> You should get things loaded at least if you make
> `MetacelloSqueakPlatform>>defaultPlatformAttributes` return #'squeak5.0'
>
> best regards
> -Tobias
>
[2]
MetacelloSqueakPlatform>>defaultPlatformAttributes
defaultPlatformAttributes
"self new defaultPlatformAttributes"
| attributes |
attributes := OrderedCollection with: #squeakCommon with: #squeak.
Smalltalk
at: #SystemVersion
ifPresent: [:cl | |versionString|
versionString := cl current version asString.
" Major version "
#( 'Squeak3.10' (#'squeak3.10.x' ())
'Squeak4' (#'squeak4.x' (
'Squeak4.1' #'squeak4.1.x'
'Squeak4.2' #'squeak4.2.x'
'Squeak4.3' #'squeak4.3.x'
'Squeak4.4' #'squeak4.4.x'
'Squeak4.5' #'squeak4.5.x'
'Squeak4.6' #'squeak4.6.x'))
'Squeak5' (#'squeak5.x' (
'Squeak5.0' #'squeak5.0.x')))
pairsDo: [:major :allAttributes |
(versionString beginsWith: major) ifTrue: [
attributes add: allAttributes first.
allAttributes second ifNotEmpty: [:minorVersions |
minorVersions pairsDo: [:minor :attribute |
(versionString beginsWith: minor) ifTrue: [
attributes add: attribute.
^ attributes]]]]]].
"HACK HJH to load Seaside into Squeak6.0a"
attributes add: #'squeak5.x'.
^ attributes
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
[3] Seaside runs fine in Squeak 5.1 as show here
https://travis-ci.org/SeasideSt/Seaside
Seaside loads fine in Squeak 5.1
https://travis-ci.org/SeasideSt/Seaside/jobs/204692009
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
[4] The test which fails is
WAGenericCodecTest
testGenericCodecMacRoman
| codec |
codec := GRCodec forEncoding: 'mac-roman'.
self assert: (codec isKindOf: GRPharoGenericCodec).
self assert: codec name = 'mac-roman'.
self assert: codec url name = 'utf-8'.
self assert: (codec url isKindOf: GRPharoUtf8Codec).
self assert: (codec encode: self latin1String) = self macromanString.
self assert: (codec url encode: self latin1String) = self utf8String.
self assert: (codec decode: self macromanString) = self latin1String.
self assert: (codec url decode: self utf8String) = self latin1String
More information about the seaside
mailing list