[squeak-dev] Re: Sake/Packages declared open!

Keith Hodges keith_hodges at yahoo.co.uk
Sun Apr 20 22:23:05 UTC 2008


(resend)

Hello Andrew,

Thanks for having a go, and working throught the wrinkles... I was very
tired last night.

Sake really deserves some mre documentation, and more tests, but I just
dont have time at the moment.

There is some in class comments.
> Hi Keith,
> "Keith Hodges" <keith_hodges at yahoo.co.uk> wrote in message 
> news:480AA7E5.2020401 at yahoo.co.uk...
>> Dear All,
>>
>> Sake/Packages is now at a point where it is a useful resource for the 
>> community to contribute to. To help this along I have set the 
>> squeaksource.com commit emails to go to 
>> packages at lists.squeakfoundation.com  Discussion as to what should go
>
> .com ? did you mean .org ?
indeed, tiredness getting the better of me there.
>> where and whether or not specific configurations work or not can be 
>> directed there also. I believe that the Sake/Packages package 
>> definitions will be a useful resource for all of the Squeak communities.
>>
>> Please join me in in this knowledge gathering exercise, please bring 
>> what you know about what loads where and feel free to fill in the 
>> package definitions. Its very easy, I updated all of 
>> Seaside/Scriptaculous in 3.7 through to 3.10 in about 10 mins.
>>
>> To load Sake/Packages into a LevelPlayingField (LPF) image:
>>
>> Installer install: 'Packages'.
>>
>> If you want to maintain all of the published versions of your package 
>> you may prefer to load.
>>
>> Installer install: 'PackageAllVersions'.
>
> I think you meant to write...
>    Installer install: 'PackagesAllVersions'
> (s was missing from end of Packages)
>
and there
>>
>> If you are using squeak 3.10 the following hierarchy of classes will 
>> load.
>>
>> 1. Packages - Abstract Base Class
>>
>> 2. PackagesAllVersions - Non-specific package definitions that load 
>> the latest version, if that version is likely (but not 100% 
>> guarenteed) to work in all versions. You don't have to wait for your 
>> package to be perfect, to put a generic definition in here, enabling 
>> your users to try it out in their favourite squeak version, and 
>> provide you with feedback.
>>
>> 3. PackagesSqueak310beta - Non-specific package definitions that load 
>> the very latest version, specific to 3.10. Again it is expected to 
>> work, but the author may not have actually tested your configuration.
>>
>> 4. PackagesSqueak310U - The specific exact published version in 
>> Universes that is supposed to have been tested in that image version.
>>
>> 5. PackagesSqueak310 - The specific exact version that 'you'/'we' 
>> have found 'actually' works, overriding the universes definition.
>
> I can see that I have this hierarchy of classes. Let's try loading 
> something that I know about.
> I am using developer image sq3.10-7159dev08.04.1 , and I can see that 
> PackagesSqueak310U has a method #FreeTypePlus, so let's try loading that.
>> From the class comment(s) , I work out that I need to evaluate this...
>    (Packages universe load: 'FreeTypePlus') run
that should work now.
> I get a walkback, looks like there is a bug in the universe method, I 
> don't think it should have ' new' at the end.
> Ok. Let's try...
>
>    (Packages current load: 'FreeTypePlus') run.
This is the correct usage, it loads the universe definition, overridden
with the current definitions if present.
> That works. It's loading... I get an error when it tries to load the 
> dependent package 'FFI', but I expected that.
> I have a patch on mantis to get FFI to load, so let's edit the entry 
> for FFI to load that patch first....
>    self load: [
> (Installer mantis)
>  bug: 6952
>  fix: 
> 'ClassBuilder-nameinEnvironmentsubclassOftypeinstanceVariableNamesclassVariableNamespoolDictionariescategoryunsafe.st'. 
>
>     Installer 
> installUrl:'http://map.squeak.org/accountbyid/cf58c358-46ee-465e-b6db-2740e9b32a53/files/InstallFFI3.st'. 
>
>    ].
>
> and try again.... It gets further, and fails after loading 
> FreeTypePlus when trying to load the fonts from the OS.
> I know what this is, the initialize methods are run in a different 
> order with MC1.5.
>
> After a couple of hours trial and error, I have a new class, 
> PackagesSqueak310 subclass: #PackagesSqueak310dev0804, which allows 
> FreeTypePlus and FFI to load into sq3.10-7159dev08.04.1.
Great!

If the dev image returns Squeak3.10 from

SystemVersion current majorAndMinorVersion

then your contribution to the world of knowledge about Squeak310, should
go into PackgesSqueak310.
> Having committed the modified Packages-Squeak310 to 
> http://www.squeaksource.com/Packages , I note that subsequent 
> invocations of...
>    Installer install: 'PackagesAllVersions'
> cause my new class to be loaded. So it is installing the most recent 
> version of Packages-Squeak310 ?
>
> I can now evaluate...
>    (PackagesSqueak310dev0804 load: 'FreeTypePlus') run.
> and FreeTypePlus & FFI get loaded.
Pacakges current load: 'FreeTypePlus'.  should work too.
> I'm not suggesting for one moment that any of this is a substitute for 
> fixing underlying bugs/problems in packages and installers; but it 
> seems to be a very useful tool for documenting those problems and 
> providing workarounds.
>
> Now, I wonder, did I do the right thing in creating the 
> PackagesSqueak310dev0804 class?
> Is it a good name?
> Were you expecting people to do this kind of thing for specific 
> versions of particular forks/distributions?
> Was I right to add my class to Packages-Squeak310, or should I have 
> created a separate package?
add your improved definitions to the PackagesSqueak310 class itself, no
need for another class (unless its another version of squeak entirely.
> Cheers,
> Andy
>
great stuff

Keith

>
>






More information about the Squeak-dev mailing list