• If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • Dokkio Sidebar (from the makers of PBworks) is a Chrome extension that eliminates the need for endless browser tabs. You can search all your online stuff without any extra effort. And Sidebar was #1 on Product Hunt! Check out what people are saying by clicking here.



Page history last edited by PBworks 13 years, 10 months ago

SystemEditor is a library to model code changes within squeak, and load them atomically.




Atomic loading is a feature Colin Putney implemented for MC2, then released as a separate, quite unstable library: SystemEditor




Goran and I picked up this library as a core component of DeltaStreams, and we fixed many bugs it had with loading different combinations of things, due to not being tested in production. In the meantime, Keith Hodges wrote a new package loader for Monticello 1.5 that hooked into SystemEditor to take advantage of it's atomic loading property. It hardly worked at all, but the principle was there. See the class MCPackageLoader2 in Monticello 1.5:




I have since stopped working on DeltaStreams and started working heavily with Keith in improving the basic tools in the image and making new ones. Since I was already familiar with SystemEditor due to my work on DeltaStreams, I volunteered to work on package loader 2. I fixed a dozen or so bugs in both package loader 2 and SystemEditor, and now it is able to load quite a few packages. It is still beta phase though. It is not yet able to cope with the following:


  • Traits
  • Tweak classes


I'm fixing those inadequacies in the order listed. Once they are fixed, we will release PackageLoader2 as the default in Monticello, and increment the version number of Monticello to 1.6.


How it works


SystemEditor has a set of classes (editor classes) that respond to the same protocol as Class, Metaclass, MethodDictionary, ClassOrganizer, SystemDictionary, and other related core classes. Each one acts as an "editor" on an existing object in the system. These editors respond to the same protocol as the object they edit, but maintain changes internally, usually as a list of additions/removals. When the time comes to commit the changes (See SystemEditor>>commit), all these editors are passed a MigrationTransaction object, and are asked to submit the old and new copy of the object they are editing, which will be swapped at commit time. When all objects have done this, MigrationTransaction builds two arrays: one of old objects, and one of new, and invokes the primitive Array>>exchangeElementIdentityWith: , which does a bulk identity swap (see MigrationTransaction>>commit). Everything that needs to change is swapped: Recompiled classes, instances of those classes, new methodDictionaries for classes that don't need recompiling, Smalltalk, the SystemDictionary instance, ClassOrganization instances, and so on, all during one primitive.




I'm fairly confident in Monticello1.6-beta, as it currently exists. I use it as my default loader in all of my images, except when I am dealing with Tweak in my croquet images.


To try it out, do the following:

HTTPSocket httpFileIn: 'installer.pbwiki.com/f/LPF.st'.

Installer install: 'Monticello16-Beta'


This loads LevelPlayingField (= Installer and MC1.5) and then runs my script to load SystemEditor and activate PackageLoader2.

Comments (0)

You don't have permission to comment on this page.