2017-04-14 17:13 GMT+02:00 Hilaire <hilaire@drgeo.eu>:
I tried but I can't reproduce the case with dummy code.
I can share privately an image though.

Hilaire

Le 14/04/2017 �� 15:24, Denis Kudriashov a ��crit :
>
> Could you create example set of packages to reproduce problem? (to be
> not dependant on your private code)
>


How to reproduce:

"Create a Trait"
Trait named:#TRoot
uses:{} package:'MyPackage'.

"Add some methods"
(Smalltalk classOrTraitNamed:'TRoot') compile:'trootA'.
(Smalltalk classOrTraitNamed:'TRoot') compile:'trootB'.
(Smalltalk classOrTraitNamed:'TRoot') compile:'trootC'.

"Create another Trait using this Trait"
Trait named:#TRootUser
uses:{(Smalltalk classOrTraitNamed:'TRoot')} package:'MyPackage'.

"Add more methods.
Note, methods still added on TRoot"
(Smalltalk classOrTraitNamed:'TRoot') compile:'troot1'.
(Smalltalk classOrTraitNamed:'TRoot') compile:'troot2'.
(Smalltalk classOrTraitNamed:'TRoot') compile:'troot3'.

"Trait TRootUser should not have any local methods"
(RPackageOrganizer default packageNamed:'MyPackage') methods inspect.


Exprected outcome:
All methods are only defined on Trait TRoot.
Actual�� outcome:
Methods from TRoot added before creating the Trait that uses TRoot, are *added* to the using trait, but only in the RPackage, the trait, *using* TRoot still *knows* that it does not hold any
local methods:

TRootUser localMethods.
->�� "#()"
TRoot localMethods
-> "{TRoot>>#troot1. TRoot>>#troot3. TRoot>>#trootC. TRoot>>#trootB. TRoot>>#trootA. TRoot>>#troot2}"

Now, if we store a snapshot of this package, the RGMethodDefinitions, wrongly assigned to trait TRootUser, will be flattened into that trait.









��
--
Dr. Geo
http://drgeo.eu