can you propose a fix? On 26 Jan 2014, at 22:56, Martin Dias <tinchodias@gmail.com> wrote:
On Sun, Jan 26, 2014 at 10:50 PM, Martin Dias <tinchodias@gmail.com> wrote:
On Sun, Jan 26, 2014 at 4:07 PM, Tudor Girba <tudor@tudorgirba.com> wrote: I looked more into it, and here is a smaller example: Gofer new smalltalkhubUser: 'Moose' project: 'MooseAlgos'; package: 'Moose-Algos-Graph'; load
This one does open the debugger, so the other emergency evaluator issue comes from somewhere else.
The problem seems to come from a Trait being defined in this package, and loading this trait triggers ClassModifiedClassDefinition which stumbles in
ClassModifiedClassDefinition>>isPropagation "If there is not slot changes, I can assume that there is a propagation (the change is in one of the superclasses)" self oldClassDefinition layout ifNil: [ ^ false ].
^ self newClassDefinition layout instanceVariables = self oldClassDefinition layout instanceVariables
Despite of the name of ClassModifiedClassDefinition, it is announced also when traits are modified. I don't know if Trait should implement #layout... but it is not.
I reproduced using this:
Trait named: #DDDD. Trait named: #DDDD uses: {TSortable} category: 'a'.
I guess that ClassModifiedClassDefinition is not only being announced when a class changed but also it is being announced when its superclass changed (in the case, "propagated"). So the purpose of #isPropagation is the check that. But I'm not sure this announcement should be done for the subclasses...
Yes, when a class is redefined, the change is announced for subclasses also. Maybe we shouldn't, no?
code to reproduce:
aClass := Object subclass: #A. aClass subclass: #B.
anns := OrderedCollection new. SystemAnnouncer uniqueInstance when: ClassModifiedClassDefinition send: #add: to: anns.
Object subclass: #A instanceVariableNames: 'a'.
anns. ---> an OrderedCollection(a ClassModifiedClassDefinition a ClassModifiedClassDefinition)
MartÃn