links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Environments 2012
Last updated at 8:14 pm UTC on 11 October 2017
After the earlier effort was abandoned a new effort taking up the ideas started in 2012 to bring name spaces into Squeak:

An Environment is an object that implements a policy for binding names
to objects during compilation.

The simplest and most common use for environments is to allow two
classes with the same name to peacefully co-exist.

Environments proposal by Colin Putney 2012
Environments update March 2013
Notes about Environments September 2016 (A)
Environments update March 2017

Notes Dec 2015

Currently saving and loading of projects has been fixed for Squeak 4.6

Note about the fix

Colin Putney
Sat, Nov 28, 2015 at 7:00 AM
Reply-To: The general-purpose Squeak developers list
To: The general-purpose Squeak developers list

This simple case where there is only one environment is described in

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.