Hi,

Why should it be in Object?  Can't it be placed in ClassDefinition maybe?
Ok, i should look what the compiler does, it's just a suggestion.

I think we should avoid putting more weird isXXX methods in Object :).

On Tue, Jun 29, 2010 at 11:02 AM, Alexandre Bergel <[email protected]>wrote:

> Hi!
>
>
> SLICE-Issue-2598-LoadingTraitCompositionFromMonticello-Alexandre_Bergel.1
> in the inbox
> -=-=-=-=-=-=
> Monticello can now load a trait composition with exclusion from Monticello.
> A test has been added for this.
> -=-=-=-=-=-=
>
> Something else, I would like to introduce Object>>isTraitComposition. This
> will greatly simplifify MCClassDefinition>>createClass. The following code
> is really ugly:
>
>  composition := Compiler evaluate: self classTraitComposition.
>                  ((((composition isCollection and: [ ( composition
> includes: nil ) not])
>                        or: [composition isKindOf: TraitComposition ])
>                                or: [composition isKindOf: Trait ])
>                                        or: [composition isKindOf:
> TraitTransformation ])
>                        ifTrue: [ class class setTraitComposition:
> composition asTraitComposition ]
>
> Is that ok if I had Object>>isTraitComposition in the Trait package?
>
> Cheers,
> Alexandre
>
>
>
> On 29 Jun 2010, at 13:04, Stéphane Ducasse wrote:
>
> > alex can you have a look at it?
> > http://code.google.com/p/pharo/issues/detail?id=2598
> >
> >>>
> >>> Stef
> >>>
> >>> On Jun 28, 2010, at 10:45 PM, Simon Denier wrote:
> >>>
> >>>>
> >>>> When loading a package with class definitions containing a trait
> composition like ClassX uses: TraitY - {#selector}, the composition is lost
> in the image.
> >>>>
> >>>> It seems closely related to previous issues 2477 and 2148
> >>>> But I am not sure if this is the same bug reappearing or a variant.
> >>>>
> >>>> To reproduce:
> >>>> Gofer new squeaksource: 'MooseAlgos'; package: 'Moose-Algos-Graph';
> package: 'Moose-Tests-Algos-Graph'; load
> >>>>
> >>>> Run tests in Moose-Tests-Algos-Graph: you should have 3 failures and 4
> errors, all due to the missing trait composition in some classes.
> >>>>
> >>>>
> >>>> After loading, you can make a diff changes in monticello, it will
> highlight the package as dirty and show you the lost trait compositions in
> two classes:
> >>>>
> >>>> MOGraphNode subclass: #MABfsNode
> >>>>    uses: MATEdgeNode - {#previousEdges. #from:edge:}
> >>>>    instanceVariableNames: 'nextEdges firstDepth'
> >>>>    classVariableNames: ''
> >>>>    poolDictionaries: ''
> >>>>    category: 'Moose-Algos-Graph'
> >>>>
> >>>> MODisjointSetNode subclass: #MANextNode
> >>>>    uses: MATNodeNode - {#from:. #previousNodes}
> >>>>    instanceVariableNames: 'nextNodes'
> >>>>    classVariableNames: ''
> >>>>    poolDictionaries: ''
> >>>>    category: 'Moose-Algos-Graph'
> >>>>
> >>>>
> >>>>
> >>>> The problem has been reproduced in 11383 and 11400 RC2.
> >>>>
> >>>>
> >>>> --
> >>>> Simon
> >>>>
> >>>> _______________________________________________
> >>>> Pharo-project mailing list
> >>>> [email protected]
> >>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
> >>>
> >>>
> >>> _______________________________________________
> >>> Pharo-project mailing list
> >>> [email protected]
> >>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
> >>
> >> --
> >> Simon
> >>
> >>
> >>
> >> _______________________________________________
> >> Pharo-project mailing list
> >> [email protected]
> >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
> >
> >
> > _______________________________________________
> > Pharo-project mailing list
> > [email protected]
> > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
>
>
> _______________________________________________
> Pharo-project mailing list
> [email protected]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to