On 20.07.2009, at 01:22, Andreas Raab wrote:
Ken Causey wrote:
So I took my trusty working.image updates yesterday or the day before and started it using the 0.15.1 exupery squeak vm and closed everything but the Transcript (just to be safe) and did a load code updates from server. It chokes on Kernel-ar.188 with an error "Method context cannot be changed". Debug log attached.
Bummer. So much for testing the bootstrap - I didn't have the previous versions in the test setup and consequently no MCDs were generated, and nobody ran into the problem. As usual, there is good news and bad news. The good news: There is an easy workaround; just run this before you try the update:
(MethodContext instVarNames includes: 'receiverMap') ifTrue:[ MethodContext instVarNames at: 2 put: 'closureOrNil'. ].
The bad news: It appears as if MCDs drop preambles. Plus, I am not sure I understand the situations under which MCDs are used. For example, I when (after the error) I tried loading that particular Kernel package, it worked although I had somewhat expected it to use a diff, too. So this might be another way to do it. If anyone can shed light on the behavior of MCDs, when they are created etc. this would be greatly appreciated.
They are created on the squeaksource server when requested (and cached there for future use). They get requested in MCConfiguration>>versionNamed:for:from:, foremost to reduce download size, resulting in an MCDiffyVersion rather than a regular MCVersion. For this, a file name like MyPackage-ab.42(xy.39).mcd is constructed if MyPackage-xy.39 is in the image and MyPackage-ab.42 is to be loaded. The diffy version contains only those methods that changed between the two versions.
IIRC, preambles are not handled specifically by DiffyVersions. So when a preamble is requested of the diffy version and it has none, then it would have to look in its base version. Not sure if this is working, it probably has never been tested before. Alternatively, the server could be modified to always include preambles in mcds.
(as an aside, mcd versions have a much greater advantage if the base version in the image is unmodified, then they can be applied *much* more efficiently than when loading a full mcz, incredibly speeding up the upgrade process)
- Bert -