Open LinqLover opened 2 years ago
And here is an interesting follow-up error that took me too much time to debug: When loading an update of the definition of a proxy class via Monticello, an error from newInstanceFrom:variable:size:map:
was not displayed but instead caught via MCPackageLoader>>#basicLoad
where that definition was added to errorDefinitions
instead and then was retried later. In the second attempt, because the class format already had been updated, no further error occurred, but the class hierarchy was in a corrupt state then because subclasses had not been updated yet (resulting in a subclass of my proxy having a smaller instSize
than its superclass). So what's wrong here? Should ClassBuilder>>#mutate:to:
have kind of transactional semantics or work in two phases (first change all definitions, then convert all instances)? Or should the error handler from MCPackageLoader
be more precise here? What was this error handler for after all? Was it only for detecting missing classes?
Given a subclass of
ProtoObject
that overridesdoesNotUnderstand:
and/or implementsinstVarAt:[put:]
in a different/faulty way,ClassDescription>>#newInstanceFrom:variable:size:map:
viaClassDescription>>#updateInstancesFrom:
will fail to update the instances when recompiling the class (or one of its superclasses). Should we use mirror primitives here?