[squeak-dev] help loading latest Squeak FFI

Bert Freudenberg bert at freudenbergs.de
Sat Jun 9 10:03:25 UTC 2012


On 2012-06-09, at 02:14, John McKeon wrote:

>> On Fri, Jun 8, 2012 at 7:11 PM, Bert Freudenberg <bert at freudenbergs.de> wrote:
>> On 08.06.2012, at 23:47, Douglas McPherson <djm1329 at san.rr.com> wrote:
>> 
>>> Hi,
>>> 
>>> I'm trying to load the latest version of FFI for Squeak. (I'm using a recent Cog VM if it makes a difference)
>>> 
>>> 1. Start with Squeak4.4-11925.image from ftp.squeakfoundation.org.
>>> 2. Update the image (latest update 12083).
>>> 3. Add a Monticello repository 'http://www.squeaksource.com/MetacelloRepository'.
>>> 4. Select and load latest configuration of FFI (ConfigurationOfFFI-tbn.23).
>>> 5. In a workspace, do: 
>>> ConfigurationOfFFI load
>>> 
>>> Results in an MNU:
>>> ExternalFunction class(Object)>>doesNotUnderstand: callingConventionModifierFor:
>>> 
>>> I'm sure I've got the process wrong somewhere. Should I be using a different repository? Maybe I'm trying something more appropriate to Pharo? Clearly, I'm confused. Help appreciated :)
>> 
>> In Squeak we normally use Installer:
>> 
>> (Installer repository: 'http://source.squeak.org/FFI')
>> install: 'FFI-Pools';
>> install: 'FFI-Kernel';
>> install: 'FFI-Tests'.
>> 
> Off topic: I have been meaning to say something about this so I thought this would be a good opportunity. If you run this code you will notice that FFI-Pools gets "loaded" three times, and FFI-Kernel twice, because install: adds the package name to the packages collection and then installs all the packages in packages.
> 
> (Installer repository: 'http://source.squeak.org/FFI')
> addPackage: 'FFI-Pools';
> addPackage: 'FFI-Kernel';
> addPackage: 'FFI-Tests';
> install.
> 
> avoids this redundancy

Not quite. Try both - the first works, the second does not.

If you do only one install, all the definitions from all the packages are merged and installed together. This may work for some packages, but not others.

> (and probably cuts down on the repository traffic a bit).

Well, the second time it comes from the cache, but still.

However, I think we can have our cake and eat it, too: We'll just clean the package list after install. This makes the first recipe (which is wide-spread) work without double installing, and shouldn't affect the other.

I just commit a fix.

- Bert -




More information about the Squeak-dev mailing list