Issue 5406 in pharo: SmalltalkEditor>>notify:at:in: and SmalltalkEditor>>selectionForDoitAsStream not in sync

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

Issue 5406 in pharo: SmalltalkEditor>>notify:at:in: and SmalltalkEditor>>selectionForDoitAsStream not in sync

pharo
Status: Accepted
Owner: [hidden email]
Labels: Type-Bug

New issue 5406 by [hidden email]: SmalltalkEditor>>notify:at:in: and  
SmalltalkEditor>>selectionForDoitAsStream not in sync
http://code.google.com/p/pharo/issues/detail?id=5406

#selectionForDoitAsStream uses the old ReadStream on:from:to:
Such stream starts at position given by the second parameter (from:) minus  
one.
This enables Compiler to mark token positions relative to the beginning of  
Text, rather than relative to the beginning of selection being evaluated.
This old hack was used in Squeak.

SmalltalkEditor>>notify:at:in: on the other hand comes from Cuis and  
expects an offset given from the beginning of sub-selection, thus syntax  
errors are reported at wrong place when evaluating a sub-selection in a  
Text.

When accepting a text with a sub-selection in the browser I can observe  
that syntax errors are not reported at the right location due to  
SmalltalkEditor>>notify:at:in:, so the error is not only when evaluating  
sub-selection, I think this method is wrong.

I suggest reverting SmalltalkEditor>>notify:at:in: like I did in Squeak and  
like Juan did in Cuis.

Then if we really want to get rid of of ReadStream on:from:to:, we should  
then remove selectionForDoitAsStream and replace senders with  
selectionAsStream.
One idea to have correct location of token would be to initialize  
requestorOffset with requestor editor startIndex - 1

I think the other places in the Compiler interacting with the requestor  
selectionInterval and token positions would work.


_______________________________________________
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 5406 in pharo: SmalltalkEditor>>notify:at:in: and SmalltalkEditor>>selectionForDoitAsStream not in sync

pharo
Updates:
        Status: FixReviewNeeded

Comment #1 on issue 5406 by [hidden email]:  
SmalltalkEditor>>notify:at:in: and  
SmalltalkEditor>>selectionForDoitAsStream not in sync
http://code.google.com/p/pharo/issues/detail?id=5406

Hehe, this seems to work indeed, but that's many method to change just to  
pass the sourceOffset information...

Name:  
SLICE-Issue-5406-SmalltalkEditornotifyatin-and-SmalltalkEditorselectionForDoitAsStream-not-in-sync-nice.1
Dependencies: CompilerTests-nice.105, System-Text-nice.199,  
Compiler-nice.321

This is a two fold change
1) correct SmalltalkEditor>>notify:at:in: which incorrectly add an offset  
corresponding to sub-selection position
This is done elsewhere, and this has not to be done when accepting the  
whole text (whatever the sub-selection)

2) get rid of ReadStream>>on:from:to: which is hackish (squeakish) way of  
taking sub-selection offset into account when interacting with text
The hack is clever, but makes Squeak Stream hardly replaceable, and some  
features of such stream highly questionable.
Use the already existing requestorOffset to pass this information.
As the compiler message chain is long, we have to add another parameter  
(sourceOffset) to a bunch of messages, which is quite heavy...


_______________________________________________
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 5406 in pharo: SmalltalkEditor>>notify:at:in: and SmalltalkEditor>>selectionForDoitAsStream not in sync

pharo
Updates:
        Labels: Milestone-1.4

Comment #2 on issue 5406 by [hidden email]:  
SmalltalkEditor>>notify:at:in: and  
SmalltalkEditor>>selectionForDoitAsStream not in sync
http://code.google.com/p/pharo/issues/detail?id=5406

(No comment was entered for this change.)


_______________________________________________
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 5406 in pharo: SmalltalkEditor>>notify:at:in: and SmalltalkEditor>>selectionForDoitAsStream not in sync

pharo

Comment #3 on issue 5406 by [hidden email]:  
SmalltalkEditor>>notify:at:in: and  
SmalltalkEditor>>selectionForDoitAsStream not in sync
http://code.google.com/p/pharo/issues/detail?id=5406

Thanks!


_______________________________________________
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 5406 in pharo: SmalltalkEditor>>notify:at:in: and SmalltalkEditor>>selectionForDoitAsStream not in sync

pharo

Comment #4 on issue 5406 by [hidden email]:  
SmalltalkEditor>>notify:at:in: and  
SmalltalkEditor>>selectionForDoitAsStream not in sync
http://code.google.com/p/pharo/issues/detail?id=5406

I read the code and I should reread it to understand :)
Now I'm too tired.


_______________________________________________
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 5406 in pharo: SmalltalkEditor>>notify:at:in: and SmalltalkEditor>>selectionForDoitAsStream not in sync

pharo
Updates:
        Labels: -Milestone-1.4 Milestone-1.5

Comment #5 on issue 5406 by [hidden email]:  
SmalltalkEditor>>notify:at:in: and  
SmalltalkEditor>>selectionForDoitAsStream not in sync
http://code.google.com/p/pharo/issues/detail?id=5406

I moved it to 1.5



_______________________________________________
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 5406 in pharo: SmalltalkEditor>>notify:at:in: and SmalltalkEditor>>selectionForDoitAsStream not in sync

pharo
In reply to this post by pharo
Updates:
        Status: FixToInclude

Comment #7 on issue 5406 by [hidden email]:  
SmalltalkEditor>>notify:at:in: and  
SmalltalkEditor>>selectionForDoitAsStream not in sync
http://code.google.com/p/pharo/issues/detail?id=5406

I could reproduce the issue, and the fix works.  I had to build the slice  
again since it overlapped with some already integrated stuff.

Name:  
SLICE-Issue-5406-SmalltalkEditornotifyatin-and-SmalltalkEditorselectionForDoitAsStream-not-in-sync-GuillermoPolito.1
Author: GuillermoPolito
Time: 27 April 2012, 3:02:32.434 pm
UUID: f5f158d8-28fa-40e6-b088-2c576f29c626
Ancestors:
Dependencies: System-Text-GuillermoPolito.200,  
Compiler-GuillermoPolito.324, CompilerTests-GuillermoPolito.105

repackage it


_______________________________________________
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 5406 in pharo: SmalltalkEditor>>notify:at:in: and SmalltalkEditor>>selectionForDoitAsStream not in sync

pharo
Updates:
        Status: Integrated

Comment #8 on issue 5406 by [hidden email]:  
SmalltalkEditor>>notify:at:in: and  
SmalltalkEditor>>selectionForDoitAsStream not in sync
http://code.google.com/p/pharo/issues/detail?id=5406

in 2.0 022


_______________________________________________
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 5406 in pharo: SmalltalkEditor>>notify:at:in: and SmalltalkEditor>>selectionForDoitAsStream not in sync

pharo
Updates:
        Status: FixToInclude

Comment #9 on issue 5406 by [hidden email]:  
SmalltalkEditor>>notify:at:in: and  
SmalltalkEditor>>selectionForDoitAsStream not in sync
http://code.google.com/p/pharo/issues/detail?id=5406

not yet.. got some error when integrating with many others together. Will  
do it alone.


_______________________________________________
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 5406 in pharo: SmalltalkEditor>>notify:at:in: and SmalltalkEditor>>selectionForDoitAsStream not in sync

pharo

Comment #10 on issue 5406 by [hidden email]:  
SmalltalkEditor>>notify:at:in: and  
SmalltalkEditor>>selectionForDoitAsStream not in sync
http://code.google.com/p/pharo/issues/detail?id=5406

Alone loading works fine.

What we plan to do in 2.0 is to revise the compiler API to use a context  
object to pass all the needed
information. So the additional parameter does not scare me, it will be part  
of the context later.


_______________________________________________
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 5406 in pharo: SmalltalkEditor>>notify:at:in: and SmalltalkEditor>>selectionForDoitAsStream not in sync

pharo

Comment #11 on issue 5406 by [hidden email]:  
SmalltalkEditor>>notify:at:in: and  
SmalltalkEditor>>selectionForDoitAsStream not in sync
http://code.google.com/p/pharo/issues/detail?id=5406

I could not merge in Pharo20. looking for System-Text-StephaneDucasse.198


_______________________________________________
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 5406 in pharo: SmalltalkEditor>>notify:at:in: and SmalltalkEditor>>selectionForDoitAsStream not in sync

pharo

Comment #12 on issue 5406 by [hidden email]:  
SmalltalkEditor>>notify:at:in: and  
SmalltalkEditor>>selectionForDoitAsStream not in sync
http://code.google.com/p/pharo/issues/detail?id=5406

Marcus can you integrate this slice because there are some changes related  
to your cleaning of tempNames.


_______________________________________________
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 5406 in pharo: SmalltalkEditor>>notify:at:in: and SmalltalkEditor>>selectionForDoitAsStream not in sync

pharo

Comment #13 on issue 5406 by [hidden email]:  
SmalltalkEditor>>notify:at:in: and  
SmalltalkEditor>>selectionForDoitAsStream not in sync
http://code.google.com/p/pharo/issues/detail?id=5406

Ok I was loaded the first one instead of the second two. But still I get 4  
conflicts.


_______________________________________________
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 5406 in pharo: SmalltalkEditor>>notify:at:in: and SmalltalkEditor>>selectionForDoitAsStream not in sync

pharo
In reply to this post by pharo

Comment #16 on issue 5406 by [hidden email]:  
SmalltalkEditor>>notify:at:in: and  
SmalltalkEditor>>selectionForDoitAsStream not in sync
http://code.google.com/p/pharo/issues/detail?id=5406

Argh
I did not see that we could integrate this change some time ago and now I  
have 11  conflicts.


_______________________________________________
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 5406 in pharo: SmalltalkEditor>>notify:at:in: and SmalltalkEditor>>selectionForDoitAsStream not in sync

pharo
Updates:
        Labels: sprintChile

Comment #17 on issue 5406 by [hidden email]:  
SmalltalkEditor>>notify:at:in: and  
SmalltalkEditor>>selectionForDoitAsStream not in sync
http://code.google.com/p/pharo/issues/detail?id=5406

So what do we do?


_______________________________________________
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 5406 in pharo: SmalltalkEditor>>notify:at:in: and SmalltalkEditor>>selectionForDoitAsStream not in sync

pharo
In reply to this post by pharo
Updates:
        Labels: -Milestone-2.0 Milestone-3.0

Comment #19 on issue 5406 by [hidden email]:  
SmalltalkEditor>>notify:at:in: and  
SmalltalkEditor>>selectionForDoitAsStream not in sync
http://code.google.com/p/pharo/issues/detail?id=5406

I think we move this to 3.0... there will be a lot of compiler related  
changed related to the Opal preview.


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