Monticello: AnObsoleteClass???

Michael van der Gulik squeakml at gulik.co.nz
Sun Apr 29 08:24:54 UTC 2007


Thanks Martin, Damien.

Martin v. Löwis wrote:
>>Where did that "AnObsolete" part come from, and why isn't my class
>>(MCNamespacedStWriter) being used now that I've fixed the DNU? Is this
>>something peculiar to Squeak, or is Monticello doing some wacky
>>reflection on its own classes?
> 
> 
> A class X is renamed to AnObsoleteX when #obsolete is sent to that
> class. This happens when removeFromSystem:, removeFromSystem, or
> removeFromSystemUnlogged is invoked.

I've discovered what happened; it was really quite simple.

I implemented a method:

MCNamespacedMczWriter>>snapshotWriterClass
	^ MCNamespacedStWriter.

Then I deleted MCNamespacedStWriter for some reason; then I decided that 
it was worth keeping after all and added it again. Obviously what 
happened was that MCNamespacedStWriter was obsoleted making the literal 
association in the compiled method refer to the obsoleted class.

When you remove a class, is there an easy way to find all "references" 
to that class in a similar way to how all senders of a method can be 
found? If so, then I consider the above to be a bug; the browser should 
have alerted me to the fact that there were references to that class 
from some methods.

Michael.




More information about the Squeak-dev mailing list