. .


Upgrading From 7.6 to 7.8

August 15, 2011 15:58:35.148

I started a serious look at upgrading our codebase from VW 7.6 to VW 7.8 today (at least, until the next crisis appears on the horizon). The first thing I did was locate this workspace script I created late last year:

"report to a file"
file := 'mesOverrideReport.txt' asFilename writeStream.
file nextPutAll: 'For VW 7.6 with MES Loaded'; cr; cr.

"find all the overridden classes"
overriddenClasses := SmalltalkWorkbench sortedClasses select: [:each | Override isOverriddenClassOrNameSpace: each].

overriddenClasses do: [:each |
	file nextPutAll: each fullName	asString.
	file cr; tab.
	file nextPutAll: each instVarNames printString.
	file tab.
	file nextPutAll: each instVarNames size printString.
	file cr; cr].
file close.

Once I had that, I created a little class that imported that data, massaged it a bit, and then grabbed the equivalent data for the 7.8 classes (I had to load a few packages to get all of that to happen. The crux of my check was to ask the objects I created this question - if the 7.6 class had more instance variables, but they otherwise matched (or vice versa for the 7.8 class), then loading the class definitions (remember, these are overrides of class definitions) would be smooth. Doing that reduced my problem space from 29 classes down to 7, and a quick manual check of those reduced it to 2. One of those was obsoleted in 7.8 (per the release notes), so I can either change the code, or just load in our (now obsolete) override.

That left me with one class where the shape had changed in a reall incompatible way, and that will entail going back to 7.6 and changing the class definition. I'll then push that into my local repository (I created a SQLLite Store to manage the tons of useless intermediate versions I'll create). That should let me at least load the code into 7.8. Lots of things will be broken, of course - there are all the method overrides to deal with. Half the battle is getting the code to load though, and I'm most of the way there now.

Technorati Tags: ,

posted by James Robertson

 Share Tweet This