tests should be green

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

tests should be green

Nicolai Hess
Please, someone can look at the Collections-Tests
The ReleaseTest complains about

testLocalMethodsOfTheClassShouldNotBeRepeatedInItsTraits
(These are all Test-subclasses that use traits, but all(!) trait method are
compiled in the class instead, this happened after someone moved the Test
packages (for bootstrap?)

OrderedCollectionTest
FloatArrayTest
ArrayTest
DateTest
HeapTest
MorphicTextAdapter
LinkedListTest
DatePrintFormatTester
StackTest
CheckboxButtonMorph
IntervalTest
DateAndTimeTest
SimpleButtonMorph
MethodDictionaryTest
SetTest
DictionaryTest
BagTest
SymbolTest
StringTest
CollectionRootTest
SortedCollectionTest

Reply | Threaded
Open this post in threaded view
|

Re: tests should be green

Marcus Denker-4
Yes,

-> there is a bug somewhere that flattens traits in some cases
-> we need to write a script to delete all the wrong methods.

> On 14 Oct 2015, at 17:16, Nicolai Hess <[hidden email]> wrote:
>
> Please, someone can look at the Collections-Tests
> The ReleaseTest complains about
>
> testLocalMethodsOfTheClassShouldNotBeRepeatedInItsTraits
> (These are all Test-subclasses that use traits, but all(!) trait method are
> compiled in the class instead, this happened after someone moved the Test
> packages (for bootstrap?)
>
> OrderedCollectionTest
> FloatArrayTest
> ArrayTest
> DateTest
> HeapTest
> MorphicTextAdapter
> LinkedListTest
> DatePrintFormatTester
> StackTest
> CheckboxButtonMorph
> IntervalTest
> DateAndTimeTest
> SimpleButtonMorph
> MethodDictionaryTest
> SetTest
> DictionaryTest
> BagTest
> SymbolTest
> StringTest
> CollectionRootTest
> SortedCollectionTest
>


Reply | Threaded
Open this post in threaded view
|

Re: tests should be green

Nicolai Hess


2015-10-15 9:36 GMT+02:00 Marcus Denker <[hidden email]>:
Yes,

-> there is a bug somewhere that flattens traits in some cases

Any idea how to fix this?

I already provided a fix for the package fileout:
( 10808 Bad behavior on FileOut/FileIn tool when using traits)

But for Monticello packages, this works differently. A quick look at MCPackage>>#snapshot shows:
....
    rPackageSet methods
        do: [:ea | definitions add: ea asMCMethodDefinition]
        displayingProgress: [ :ea| 'Snapshotting methods...' ].
       
    rPackageSet overriddenMethods
        do: [:ea | definitions add:
                    (rPackageSet changeRecordForOverriddenMethod: ea) asMCMethodDefinition]
        displayingProgress: [ :ea| 'Searching for overrides in ', ea asString ].
       
...

here, rPackageSet methods
and rPackageSet overrriddenMethods
create RGMethodDefinition for all, trait and non trait methods.

We could try to solve this by adding a #reject:

    rPackageSet methods reject:#isFromTrait .....




 
-> we need to write a script to delete all the wrong methods.

> On 14 Oct 2015, at 17:16, Nicolai Hess <[hidden email]> wrote:
>
> Please, someone can look at the Collections-Tests
> The ReleaseTest complains about
>
> testLocalMethodsOfTheClassShouldNotBeRepeatedInItsTraits
> (These are all Test-subclasses that use traits, but all(!) trait method are
> compiled in the class instead, this happened after someone moved the Test
> packages (for bootstrap?)
>
> OrderedCollectionTest
> FloatArrayTest
> ArrayTest
> DateTest
> HeapTest
> MorphicTextAdapter
> LinkedListTest
> DatePrintFormatTester
> StackTest
> CheckboxButtonMorph
> IntervalTest
> DateAndTimeTest
> SimpleButtonMorph
> MethodDictionaryTest
> SetTest
> DictionaryTest
> BagTest
> SymbolTest
> StringTest
> CollectionRootTest
> SortedCollectionTest
>


Reply | Threaded
Open this post in threaded view
|

Re: tests should be green

stepharo
Hi niolai

I do not know and too busy to get concentrated on that or on anything in fact.
After january I hope it will get better.

Stef


Le 15/10/15 13:01, Nicolai Hess a écrit :


2015-10-15 9:36 GMT+02:00 Marcus Denker <[hidden email]>:
Yes,

-> there is a bug somewhere that flattens traits in some cases

Any idea how to fix this?

I already provided a fix for the package fileout:
( 10808 Bad behavior on FileOut/FileIn tool when using traits)

But for Monticello packages, this works differently. A quick look at MCPackage>>#snapshot shows:
....
    rPackageSet methods
        do: [:ea | definitions add: ea asMCMethodDefinition]
        displayingProgress: [ :ea| 'Snapshotting methods...' ].
       
    rPackageSet overriddenMethods
        do: [:ea | definitions add:
                    (rPackageSet changeRecordForOverriddenMethod: ea) asMCMethodDefinition]
        displayingProgress: [ :ea| 'Searching for overrides in ', ea asString ].
       
...

here, rPackageSet methods
and rPackageSet overrriddenMethods
create RGMethodDefinition for all, trait and non trait methods.

We could try to solve this by adding a #reject:

    rPackageSet methods reject:#isFromTrait .....




 
-> we need to write a script to delete all the wrong methods.

> On 14 Oct 2015, at 17:16, Nicolai Hess <[hidden email]> wrote:
>
> Please, someone can look at the Collections-Tests
> The ReleaseTest complains about
>
> testLocalMethodsOfTheClassShouldNotBeRepeatedInItsTraits
> (These are all Test-subclasses that use traits, but all(!) trait method are
> compiled in the class instead, this happened after someone moved the Test
> packages (for bootstrap?)
>
> OrderedCollectionTest
> FloatArrayTest
> ArrayTest
> DateTest
> HeapTest
> MorphicTextAdapter
> LinkedListTest
> DatePrintFormatTester
> StackTest
> CheckboxButtonMorph
> IntervalTest
> DateAndTimeTest
> SimpleButtonMorph
> MethodDictionaryTest
> SetTest
> DictionaryTest
> BagTest
> SymbolTest
> StringTest
> CollectionRootTest
> SortedCollectionTest
>



Reply | Threaded
Open this post in threaded view
|

Re: tests should be green

Marcus Denker-4
In reply to this post by Nicolai Hess
Hello, yes, this looks like a solution to me. Can you open an issue?

Marcus
On 15 Oct 2015, at 13:01, Nicolai Hess <[hidden email]> wrote:



2015-10-15 9:36 GMT+02:00 Marcus Denker <[hidden email]>:
Yes,

-> there is a bug somewhere that flattens traits in some cases

Any idea how to fix this?

I already provided a fix for the package fileout:
( 10808 Bad behavior on FileOut/FileIn tool when using traits)

But for Monticello packages, this works differently. A quick look at MCPackage>>#snapshot shows:
....
    rPackageSet methods
        do: [:ea | definitions add: ea asMCMethodDefinition]
        displayingProgress: [ :ea| 'Snapshotting methods...' ].
       
    rPackageSet overriddenMethods
        do: [:ea | definitions add:
                    (rPackageSet changeRecordForOverriddenMethod: ea) asMCMethodDefinition]
        displayingProgress: [ :ea| 'Searching for overrides in ', ea asString ].
       
...

here, rPackageSet methods
and rPackageSet overrriddenMethods
create RGMethodDefinition for all, trait and non trait methods.

We could try to solve this by adding a #reject:

    rPackageSet methods reject:#isFromTrait .....




 
-> we need to write a script to delete all the wrong methods.

> On 14 Oct 2015, at 17:16, Nicolai Hess <[hidden email]> wrote:
>
> Please, someone can look at the Collections-Tests
> The ReleaseTest complains about
>
> testLocalMethodsOfTheClassShouldNotBeRepeatedInItsTraits
> (These are all Test-subclasses that use traits, but all(!) trait method are
> compiled in the class instead, this happened after someone moved the Test
> packages (for bootstrap?)
>
> OrderedCollectionTest
> FloatArrayTest
> ArrayTest
> DateTest
> HeapTest
> MorphicTextAdapter
> LinkedListTest
> DatePrintFormatTester
> StackTest
> CheckboxButtonMorph
> IntervalTest
> DateAndTimeTest
> SimpleButtonMorph
> MethodDictionaryTest
> SetTest
> DictionaryTest
> BagTest
> SymbolTest
> StringTest
> CollectionRootTest
> SortedCollectionTest
>



Reply | Threaded
Open this post in threaded view
|

Re: tests should be green

Marcus Denker-4
In reply to this post by Marcus Denker-4

On 15 Oct 2015, at 09:36, Marcus Denker <[hidden email]> wrote:

Yes,

-> there is a bug somewhere that flattens traits in some cases
-> we need to write a script to delete all the wrong methods.


I inspected the failing lint rule and executed on the dictionary:

self keys do: [:classSymbol |
    (self at: classSymbol) do: [:selector |
        classSymbol asClass removeSelector: selector.
    ]]

resulting slice is committed:

On 14 Oct 2015, at 17:16, Nicolai Hess <[hidden email]> wrote:

Please, someone can look at the Collections-Tests
The ReleaseTest complains about

testLocalMethodsOfTheClassShouldNotBeRepeatedInItsTraits
(These are all Test-subclasses that use traits, but all(!) trait method are
compiled in the class instead, this happened after someone moved the Test
packages (for bootstrap?)

OrderedCollectionTest
FloatArrayTest
ArrayTest
DateTest
HeapTest
MorphicTextAdapter
LinkedListTest
DatePrintFormatTester
StackTest
CheckboxButtonMorph
IntervalTest
DateAndTimeTest
SimpleButtonMorph
MethodDictionaryTest
SetTest
DictionaryTest
BagTest
SymbolTest
StringTest
CollectionRootTest
SortedCollectionTest



Reply | Threaded
Open this post in threaded view
|

Re: tests should be green

Nicolai Hess-3-2


2015-10-27 16:45 GMT+01:00 Marcus Denker <[hidden email]>:

On 15 Oct 2015, at 09:36, Marcus Denker <[hidden email]> wrote:

Yes,

-> there is a bug somewhere that flattens traits in some cases
-> we need to write a script to delete all the wrong methods.


I inspected the failing lint rule and executed on the dictionary:

self keys do: [:classSymbol |
    (self at: classSymbol) do: [:selector |
        classSymbol asClass removeSelector: selector.
    ]]

resulting slice is committed:


Good!

The strange thing is, I said I ve found the reason why this trait methods were moved to the
class. But I can not reproduce it anymore.
I was sure
"RPackageSet methods " would collect all trait and non-traitmethods of a class and this gets written into thet package.
But now, I can not reproduce this anymore.


 
On 14 Oct 2015, at 17:16, Nicolai Hess <[hidden email]> wrote:

Please, someone can look at the Collections-Tests
The ReleaseTest complains about

testLocalMethodsOfTheClassShouldNotBeRepeatedInItsTraits
(These are all Test-subclasses that use traits, but all(!) trait method are
compiled in the class instead, this happened after someone moved the Test
packages (for bootstrap?)

OrderedCollectionTest
FloatArrayTest
ArrayTest
DateTest
HeapTest
MorphicTextAdapter
LinkedListTest
DatePrintFormatTester
StackTest
CheckboxButtonMorph
IntervalTest
DateAndTimeTest
SimpleButtonMorph
MethodDictionaryTest
SetTest
DictionaryTest
BagTest
SymbolTest
StringTest
CollectionRootTest
SortedCollectionTest




Reply | Threaded
Open this post in threaded view
|

Re: tests should be green

stepharo
In reply to this post by Marcus Denker-4
> we need to write a script to delete all the wrong methods.


I inspected the failing lint rule and executed on the dictionary:

self keys do: [:classSymbol |
    (self at: classSymbol) do: [:selector |
        classSymbol asClass removeSelector: selector.
    ]]

resulting slice is committed:

Marcus we should NOT use asClass in the system.
It is a bad concept because the environment is not explicit.
It is a plague and we will fight it when we will want a real "remote" environment.

Stef
Reply | Threaded
Open this post in threaded view
|

Re: tests should be green

Marcus Denker-4

On 01 Nov 2015, at 02:06, stepharo <[hidden email]> wrote:

> we need to write a script to delete all the wrong methods.


I inspected the failing lint rule and executed on the dictionary:

self keys do: [:classSymbol |
    (self at: classSymbol) do: [:selector |
        classSymbol asClass removeSelector: selector.
    ]]

resulting slice is committed:

Marcus we should NOT use asClass in the system.

Yes, it was just a throw-away script. Not in the image.

Marcus
Reply | Threaded
Open this post in threaded view
|

Re: tests should be green

Peter Uhnak
Marcus we should NOT use asClass in the system.

What is the appropriate retrieval of classes from a string/symbol? Asking the Globals table?

Peter
Reply | Threaded
Open this post in threaded view
|

Re: tests should be green

stepharo
In reply to this post by Marcus Denker-4
great!


Le 1/11/15 01:00, Marcus Denker a écrit :

On 01 Nov 2015, at 02:06, stepharo <[hidden email]> wrote:

> we need to write a script to delete all the wrong methods.


I inspected the failing lint rule and executed on the dictionary:

self keys do: [:classSymbol |
    (self at: classSymbol) do: [:selector |
        classSymbol asClass removeSelector: selector.
    ]]

resulting slice is committed:

Marcus we should NOT use asClass in the system.

Yes, it was just a throw-away script. Not in the image.

Marcus

Reply | Threaded
Open this post in threaded view
|

Re: tests should be green

stepharo
In reply to this post by Peter Uhnak

if it makes sense

    self environment at:

else

    Smalltalk globals at:

like that it is clear and the environment is under control not the class.



Le 1/11/15 02:40, Peter Uhnák a écrit :
Marcus we should NOT use asClass in the system.

What is the appropriate retrieval of classes from a string/symbol? Asking the Globals table?

Peter