[squeak-dev] It's not yet clear how serialization should work in the presence of environments

Colin Putney colin at wiresong.com
Sat Nov 28 06:00:44 UTC 2015


On Tue, Nov 24, 2015 at 1:01 PM, H. Hirzel <hannes.hirzel at gmail.com> wrote:


>  This simple case where there is only one environment is described in
> http://bugs.squeak.org/view.php?id=7814
>
> And currently probably nearly 100% of the users still have only one
> environment.
>
> What would it mean to fix this case?
>

Ok, I think I've got it sorted out. I've made the following changes in
trunk:

- Bindings implement #objectForDataStream: by always creating a DiskProxy
- Association should never create a DiskProxy, so no longer implement
#objectForDataStream:
- DiskProxy now uses the current environment in #comeUpFullyOnReload:,
rather than Smalltalk

That should take care of the single-environment case. It should also work
for multi-environment images, if we create UI for setting the "current"
environment, or actually make use of the "environment" instance variable in
Project.

One other change was required to get loading a project to work, but this
has nothing to do with environments. In the Inbox, I've uploaded a version
of Morphic that implements PasteUpMorph>>referencePool, which creates a new
reference pool... whatever that is. Could someone who knows more about
Projects review that, please?

With these four changes, it's possible to save and load projects in a
Squeak 4.6 image. It doesn't work in a trunk image, however. The Spur VM
crashes when saving a project. I've reported that on the VM list. It also
fails to load an image segment - looks like the primitive for that isn't
quite finished in Spur.

Though I've tested these changes in a 4.6 image, I committed them to trunk
only. What's the correct way to get them into the 4.6 update stream as well?

Colin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151127/940b6313/attachment-0001.htm


More information about the Squeak-dev mailing list