Status: Accepted
Owner:
[hidden email]
Labels: Type-Defect Priority-Medium GLASS-Server Version-GLASS0.231
bugid-41763
New issue 334 by
[hidden email]: versioning class references
instance of GsClassDocumentation, does not copy
http://code.google.com/p/glassdb/issues/detail?id=334from original Internal bugreport:
If you have a class, and create a class comment by creating a
GsClassDocumentation and putting it in the description field, the instance
of GsClassDocumentation references the class (inst var itsClass).
If you create a new version using the method
subclass:instVarNames:classVars:classInstVars:poolDictionaries:inDictionary:instancesInvariant:newVersionOf:isModifiable:.
it justs sets the description of the new class to the description of the
old class. The instance of GsClassDocumentation is now referenced by the
new class, but GsClassDocumentation.itsClass continues to refer to the old
class instance.
If you want to get rid of the original class, you migh think all you have
to do is have no instances and remove it from the classHistory, so this
results in uncollectable garbage.
findReferencePathToObject: doesn't detect this and declares the class
disconnected, but findReferences: shows the GsClassDocumentation.
This can still be a problem in 3.0, but only if you really try.
(1) description is nilled during conversion and comments creates from GBS
are not stored as GsClassDocumentation instances and (2) non-deprecated
subclass creation methods either require description passed in, or set the
new description to nil. So only if you restore your description after
conversion (which we suggest) and use deprecated subclass creation methods
(likely in code but not in GBS), is this bug a problem in 3.0.