[Glass] order of classvars changed after load
Richard Sargent via Glass
glass at lists.gemtalksystems.com
Thu May 19 12:00:30 PDT 2016
GLASS mailing list wrote
> Hi,
>
> I noticed a class getting a new class version when there had only been
> changes to class methods on a class.
> After investigation, it’s because the order of class variables seemingly
> changed
Since the class variables are held in a Dictionary, there really is no
"order", per se. While the class creation method may require an Array
argument, the order implied by the collection is not preserved.
If you look at the implementation of
#'subclass:instVarNames:classVars:classInstVars:poolDictionaries:inDictionary:newVersionOf:description:options:',
you will see that it tests for equivalency of the new definition to the
existing one. There have been changes in recent times to this mechanism in
order to reduce/eliminate the number of cases in which a new class version
is created unnecessarily. I think this was in one of the 3.2 releases, but I
don't recall which one.
What version of GemStone are you using?
> from:
> classVars: #( ObjectsForKeyword ObjectsForScope ObjectTestsForScope
> PropertiesForKeywords)
> to:
> classVars: #( ObjectTestsForScope ObjectsForKeyword ObjectsForScope
> PropertiesForKeywords)
>
> However, the already loaded mcz file and the new mcz file for the package
> of this class have the same ordering (the last one) defined.
> When I use Monticello to check for ‘changes’ in the image with respect to
> the current loaded mcz, it reports the changed class variable ordering.
> However, merging the new mcz into the image does not detect these changes,
> only a ‘full load’ triggers the setting of a new class version.
>
> Summarizing, it seems the class definition in the image has a different
> class variable ordering defined than what was/is in the mcz file.
>
> Is there any ‘class var reordering’ logic going in during such loads? Not
> sure if I can reproduce this, because it’s a bit hard to find out when
> this class var order change would have occurred.
>
> Johan
>
> _______________________________________________
> Glass mailing list
> Glass at .gemtalksystems
> http://lists.gemtalksystems.com/mailman/listinfo/glass
--
View this message in context: http://forum.world.st/order-of-classvars-changed-after-load-tp4896157p4896164.html
Sent from the GLASS mailing list archive at Nabble.com.
More information about the Glass
mailing list