[vwnc] Bug? in NamedChangeSet ...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[vwnc] Bug? in NamedChangeSet ...

Dennis smith-4
NamedChangeSet has a method

changedClassDefinitions
    "Answer a collection of the changed (added or redefined) classes,
not including removed classes."

    | classes |
    classes := Set new.
    self objectChanges keysAndValuesDo: [:className :chGrp | | class |
        (class := self classNamed: className) notNil ifTrue:
            [classes add: class.
            (class class isMeta
            and: [class class nonTrivial
            and: [chGrp changes includes: #add]]) ifTrue:
                [classes add: class class]]].
    ^classes

The problem is that "objectChanges" includes class variable names, such as
    'PP.Tools.PPstate.DefaultState'
the "self classNamed: ..." method for this returns the "value" of that
class variable which can be anything.  Thus this "anything" gets into the
list of classes changed.  In my case, the "Set" equality test failed for
other
reasons on the value returned.

Seems to me that this is a problem, although I don't know for sure how
to fix it.
Can't test that the result is a class since it might be a class, but
might be
some totally unrelated class.

--
Dennis Smith                         +1 416.798.7948
Cherniak Software Development Corporation   Fax: +1 416.798.0948
509-2001 Sheppard Avenue East        [hidden email]
Toronto, ON M2J 4Z8              sip:[hidden email]
Canada         http://www.CherniakSoftware.com
Entrance off Yorkland Blvd south of Sheppard Ave east of the DVP

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc