Issue 4943 in pharo: Failing Test: SelfEvaluatingObjectTest

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

Issue 4943 in pharo: Failing Test: SelfEvaluatingObjectTest

pharo
Status: Accepted
Owner: [hidden email]
Labels: Type-FailingTest Milestone-1.4

New issue 4943 by [hidden email]: Failing Test:  
SelfEvaluatingObjectTest
http://code.google.com/p/pharo/issues/detail?id=4943

https://ci.lille.inria.fr/pharo/job/Pharo%201.4%20Tests-Unix/lastCompletedBuild/testReport/


KernelTests.Objects.SelfEvaluatingObjectTest.testArray


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 4943 in pharo: Failing Test: SelfEvaluatingObjectTest

pharo

Comment #1 on issue 4943 by [hidden email]: Failing Test:  
SelfEvaluatingObjectTest
http://code.google.com/p/pharo/issues/detail?id=4943

Array>>#printAsSelfEvaluatingFormOn: was changed to use #printOn: rather  
than #storeOn:

Point>>#printOn: does not use (), while storeOn: does.

I propose to let Point behave as Fraction and always use ().
Technically, every selfEvaluating expression using binary or keyword  
messages should use (), otherwise selfEvaluating expression cannot be  
composed.

An alternative would be to build an AST, and let an AST printer put ()  
where needed.


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 4943 in pharo: Failing Test: SelfEvaluatingObjectTest

pharo

Comment #2 on issue 4943 by [hidden email]: Failing Test:  
SelfEvaluatingObjectTest
http://code.google.com/p/pharo/issues/detail?id=4943

Though, the test also hardcodes:

self assertCode: '{10@10 corner: 20@20 . 100@100 corner: 200@200}'  
print: '{(10@10 corner: 20@20). (100@100 corner: 200@200)

My proposition produces (and still fails):
  {(10@10) corner: (20@20). (100@100) corner: (200@200)}

I see no immediate solution but an easy workaround: change the test


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 4943 in pharo: Failing Test: SelfEvaluatingObjectTest

pharo
Updates:
        Status: FixReviewNeeded

Comment #3 on issue 4943 by [hidden email]: Failing Test:  
SelfEvaluatingObjectTest
http://code.google.com/p/pharo/issues/detail?id=4943

I put a SLICE for review in the inbox with AST-based solution.
This does not solve directly the bug, but show how we could solve elegantly.
If OK, we can just change printOn: when isSelfEvaluating and change the  
tests to fit minimal parenthesis.


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 4943 in pharo: Failing Test: SelfEvaluatingObjectTest

pharo

Comment #4 on issue 4943 by [hidden email]: Failing Test:  
SelfEvaluatingObjectTest
http://code.google.com/p/pharo/issues/detail?id=4943

Note that a second SLICE pushes the idea further and provides some  
successfull tests


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 4943 in pharo: Failing Test: SelfEvaluatingObjectTest

pharo

Comment #5 on issue 4943 by [hidden email]: Failing Test:  
SelfEvaluatingObjectTest
http://code.google.com/p/pharo/issues/detail?id=4943

Nicolas this is interesting. Now since we would like to arrive to a small  
kernel one of this days I would prefer noo to have dependency to AST to  
print core objects. What do you think?

I changed Point printOn: to (100@100) instead of 100@100.


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 4943 in pharo: Failing Test: SelfEvaluatingObjectTest

pharo
Updates:
        Status: closed

Comment #6 on issue 4943 by [hidden email]: Failing Test:  
SelfEvaluatingObjectTest
http://code.google.com/p/pharo/issues/detail?id=4943

Test fixed + point printing in 14230


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 4943 in pharo: Failing Test: SelfEvaluatingObjectTest

pharo

Comment #7 on issue 4943 by [hidden email]: Failing Test:  
SelfEvaluatingObjectTest
http://code.google.com/p/pharo/issues/detail?id=4943

Yes, AST is not the most light weight.
The big drawback is that it hardly scales (you have to duplicate a whole  
object structure into an AST).

The only important thing in this architecture is to rely on message sends  
to rebuild some objects.
And AST could easily be replaced: the builder could just stream out the  
message sends as they come. A stack of message sends precedence in builder  
inst. var. would be enough to handle parenthesis.

Now I fairly well understand that the easiest solution is to always force  
() and stream out without requiring any infrastructure.


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 4943 in pharo: Failing Test: SelfEvaluatingObjectTest

pharo

Comment #8 on issue 4943 by [hidden email]: Failing Test:  
SelfEvaluatingObjectTest
http://code.google.com/p/pharo/issues/detail?id=4943

:)

Stef


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker