[Pharo-project] support for flattening-out traits for export?

Adrian Lienhard adi at netstyle.ch
Tue Jun 7 06:29:00 EDT 2011


IIRC this can be achieved with two small changes:

- Comment out the line "method isLocalSelector" from PackageInfo>>methods. This will flatten the traits into the classes, i.e., make all methods of a class being stored even if they come from a trait.

- In addition you probably need to change PackageInfo>>classes to filter out all traits (like  ... reject: #isTrait).

HTH,
Adrian

On Jun 7, 2011, at 08:11 , Mariano Martinez Peck wrote:

> On Tue, Jun 7, 2011 at 12:47 AM, Eliot Miranda <eliot.miranda at gmail.com>wrote:
> 
>> Hi All,
>> 
>>    if I want to export a package (Fuel!!) to a dialect without traits is
>> there anything to help me remove the trait info and just file-out the
>> composed code?
>> 
>> 
> Hi Eliot. Traits are only used in Fuel for testing. And really used for
> testing methods for classes and traits (not the basic methods). So, of
> course, you can directly fileout the Fuel package only without traits.
> 
> One of the things I always wanted is what you are really asking, a way to
> fileout forgetting traits, just letting those methods directly in the
> classes. But I have no idea if that's possible.
> 
> Finally, I was never really convinced about the Traits usage in Fuel. Mostly
> because some tools seem not to be happy with them...We should check how much
> difficult and what we loose removing them now....
> 
> Cheers
> 
> -- 
> Mariano
> http://marianopeck.wordpress.com





More information about the Pharo-dev mailing list