Quantcast

Traits methods flattened

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Traits methods flattened

HilaireFernandes
Hi,

I installed the slice in a Pharo5 image. It does not work on my package,
nor the the test package.

https://pharo.fogbugz.com/f/cases/19938

Does the slice only work on Pharo6?

Hilaire

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



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Traits methods flattened

Ben Coman
On Sat, Apr 22, 2017 at 12:54 AM, Hilaire <[hidden email]> wrote:
> Hi,
>
> I installed the slice in a Pharo5 image. It does not work on my package,
> nor the the test package.
>
> https://pharo.fogbugz.com/f/cases/19938
>
> Does the slice only work on Pharo6?

I don't know, but I see sixty Trait related issues integrated into Pharo 6.
https://tinyurl.com/Pharo60IssuesTraits

cheers -ben

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Traits methods flattened

HilaireFernandes
Hello,

I don't know either, that's why I asked ;)

I hope Peter can tell us, he provided this SLICE for this specific
problem with Traits.

Hilaire


Le 21/04/2017 à 19:24, Ben Coman a écrit :

>> Hi,
>>
>> I installed the slice in a Pharo5 image. It does not work on my package,
>> nor the the test package.
>>
>> https://pharo.fogbugz.com/f/cases/19938
>>
>> Does the slice only work on Pharo6?
> I don't know, but I see sixty Trait related issues integrated into Pharo 6.
> https://tinyurl.com/Pharo60IssuesTraits
>
> cheers -ben
>
>

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



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Traits methods flattened

HilaireFernandes
I mean Pavel, not Peter, sorry.


Le 22/04/2017 à 11:08, Hilaire a écrit :
> Hello,
>
> I don't know either, that's why I asked ;)
>
> I hope Peter can tell us, he provided this SLICE for this specific
> problem with Traits.
>
> Hilaire

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



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Traits methods flattened

HilaireFernandes
In reply to this post by Ben Coman
Hello again,

The slice did not load the necessary dependency.

Now, the test code provided in the bug ticket pass.

However my package with non trivial Traits use is still not saved
correctly: traits methods are flattened in the user classes.

I can share a fileout of the package for testing and bug tracking.

Hilaire


Le 21/04/2017 à 19:24, Ben Coman a écrit :

> On Sat, Apr 22, 2017 at 12:54 AM, Hilaire <[hidden email]> wrote:
>> Hi,
>>
>> I installed the slice in a Pharo5 image. It does not work on my package,
>> nor the the test package.
>>
>> https://pharo.fogbugz.com/f/cases/19938
>>
>> Does the slice only work on Pharo6?
> I don't know, but I see sixty Trait related issues integrated into Pharo 6.
> https://tinyurl.com/Pharo60IssuesTraits

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



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Traits methods flattened

Pavel Krivanek-3

2017-04-22 16:31 GMT+02:00 Hilaire <[hidden email]>:
Hello again,

The slice did not load the necessary dependency.

Now, the test code provided in the bug ticket pass.

However my package with non trivial Traits use is still not saved
correctly: traits methods are flattened in the user classes.

I can share a fileout of the package for testing and bug tracking.

Hilaire


Le 21/04/2017 à 19:24, Ben Coman a écrit :
> On Sat, Apr 22, 2017 at 12:54 AM, Hilaire <[hidden email]> wrote:
>> Hi,
>>
>> I installed the slice in a Pharo5 image. It does not work on my package,
>> nor the the test package.
>>
>> https://pharo.fogbugz.com/f/cases/19938
>>
>> Does the slice only work on Pharo6?
> I don't know, but I see sixty Trait related issues integrated into Pharo 6.
> https://tinyurl.com/Pharo60IssuesTraits

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




Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Traits methods flattened

Stephane Ducasse-3
Thanks Pavel!!!
I'm so tired and exhausted I nearly slept all the afternoon :(
Not good. But I will recover. 

On Sat, Apr 22, 2017 at 4:42 PM, Pavel Krivanek <[hidden email]> wrote:

2017-04-22 16:31 GMT+02:00 Hilaire <[hidden email]>:
Hello again,

The slice did not load the necessary dependency.

Now, the test code provided in the bug ticket pass.

However my package with non trivial Traits use is still not saved
correctly: traits methods are flattened in the user classes.

I can share a fileout of the package for testing and bug tracking.

Hilaire


Le 21/04/2017 à 19:24, Ben Coman a écrit :
> On Sat, Apr 22, 2017 at 12:54 AM, Hilaire <[hidden email]> wrote:
>> Hi,
>>
>> I installed the slice in a Pharo5 image. It does not work on my package,
>> nor the the test package.
>>
>> https://pharo.fogbugz.com/f/cases/19938
>>
>> Does the slice only work on Pharo6?
> I don't know, but I see sixty Trait related issues integrated into Pharo 6.
> https://tinyurl.com/Pharo60IssuesTraits

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





Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Traits methods flattened

HilaireFernandes
Hi Stef,

I shared with Pavel my package because the fix for pharo5 did not work
on my package.

Since years because of my incurable disease I need to take rest during
the day. When things get break in Pharo and I get stuck, I behave like
an impatient and I fell I am running out of time.

Take rest, cherish your health like your kids!

Hilaire

Le 22/04/2017 à 18:34, Stephane Ducasse a écrit :
> Thanks Pavel!!!
> I'm so tired and exhausted I nearly slept all the afternoon :(
> Not good. But I will recover.

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



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Traits methods flattened

HilaireFernandes
In reply to this post by Pavel Krivanek-3
Is there a way I can test on a Pharo6 image, because the backport does
not fix my problem with Traits on Pharo5?

I am reopening the ticket.

Hilaire


Le 22/04/2017 à 16:42, Pavel Krivanek a écrit :
> backported:
> https://pharo.fogbugz.com/f/cases/19974/backport-Traits-methods-flattened-case-19938
>
> Test please...
> -- Pavel

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



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Traits methods flattened

HilaireFernandes
Ah, no sorry. After another try I got it right, I have to unload the
package then file it in again to get it right.

So the fix work for my problem too, issue definitely fixed and closed.

Thanks


Le 25/04/2017 à 09:37, Hilaire a écrit :

> Is there a way I can test on a Pharo6 image, because the backport does
> not fix my problem with Traits on Pharo5?
>
> I am reopening the ticket.
>
> Hilaire
>
>
> Le 22/04/2017 à 16:42, Pavel Krivanek a écrit :
>> backported:
>> https://pharo.fogbugz.com/f/cases/19974/backport-Traits-methods-flattened-case-19938
>>
>> Test please...
>> -- Pavel

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



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Traits methods flattened

Nicolai Hess-3-2


2017-04-25 10:12 GMT+02:00 Hilaire <[hidden email]>:
Ah, no sorry. After another try I got it right, I have to unload the
package then file it in again to get it right.

So the fix work for my problem too, issue definitely fixed and closed.

Thanks


Keep in mind.
1. the way new trait methods are handled is still wrong
   if non-local methods (methods from  a trait) aren't added to the rpackage when creating the user of this trait, why are  new trait methods "flattened" into this package
2. we already have some "corrupted" (flattened) packages in the image. (some methods of users of Traits are copied from the trait).
    For example,
    traits using the trait GLMBrickExtensionTrait or
    test case traits using other traits (TRemoveForMultiplenessTest / TRemoveTest, TDictionaryCopyingTest/TCloneTest)
 

Le 25/04/2017 à 09:37, Hilaire a écrit :
> Is there a way I can test on a Pharo6 image, because the backport does
> not fix my problem with Traits on Pharo5?
>
> I am reopening the ticket.
>
> Hilaire
>
>
> Le 22/04/2017 à 16:42, Pavel Krivanek a écrit :
>> backported:
>> https://pharo.fogbugz.com/f/cases/19974/backport-Traits-methods-flattened-case-19938
>>
>> Test please...
>> -- Pavel

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




Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Traits methods flattened

HilaireFernandes
Can you produce tests exposing these fails?

Hilaire


Le 25/04/2017 à 10:47, Nicolai Hess a écrit :

> Keep in mind.
> 1. the way new trait methods are handled is still wrong
>    if non-local methods (methods from  a trait) aren't added to the
> rpackage when creating the user of this trait, why are  new trait
> methods "flattened" into this package
> 2. we already have some "corrupted" (flattened) packages in the image.
> (some methods of users of Traits are copied from the trait).
>     For example,
>     traits using the trait GLMBrickExtensionTrait or
>     test case traits using other traits (TRemoveForMultiplenessTest /
> TRemoveTest, TDictionaryCopyingTest/TCloneTest)
>  

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



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Traits methods flattened

Nicolai Hess-3-2


2017-04-25 19:08 GMT+02:00 Hilaire <[hidden email]>:
Can you produce tests exposing these fails?

|set|
set := Set new.
Smalltalk allClassesAndTraits select:[:tc | tc traitComposition notEmpty] thenDo:[:b | |tc nonLocal| tc:= b traits.
    nonLocal :=
    b localMethods select:[:m |
        tc anySatisfy:[:t | t methods contains:[:tm|
                ((tm selector = m selector and:[tm bytecode = m bytecode])
                and:[tm literals allButLast = m literals allButLast])]]].
    nonLocal notEmpty ifTrue:[set addAll:( nonLocal)]].

MessageBrowser browse:set


 

Hilaire


Le 25/04/2017 à 10:47, Nicolai Hess a écrit :
> Keep in mind.
> 1. the way new trait methods are handled is still wrong
>    if non-local methods (methods from  a trait) aren't added to the
> rpackage when creating the user of this trait, why are  new trait
> methods "flattened" into this package
> 2. we already have some "corrupted" (flattened) packages in the image.
> (some methods of users of Traits are copied from the trait).
>     For example,
>     traits using the trait GLMBrickExtensionTrait or
>     test case traits using other traits (TRemoveForMultiplenessTest /
> TRemoveTest, TDictionaryCopyingTest/TCloneTest)
>

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




Loading...