Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REPL completion completely broken on dot continuation on 2.13 #10914

Closed
som-snytt opened this issue May 31, 2018 · 12 comments
Closed

REPL completion completely broken on dot continuation on 2.13 #10914

som-snytt opened this issue May 31, 2018 · 12 comments
Assignees
Milestone

Comments

@som-snytt
Copy link

scala 2.13.0-M4> $intp
res0: scala.tools.nsc.interpreter.Repl = scala.tools.nsc.interpreter.IMain@716e431d

scala 2.13.0-M4> .repreporter
                      ^
                 error: value repreporter is not a member of scala.tools.nsc.interpreter.Repl

scala 2.13.0-M4> 
@som-snytt som-snytt self-assigned this May 31, 2018
@SethTisue SethTisue added the repl label Jun 6, 2018
@SethTisue SethTisue added this to the Backlog milestone Jun 6, 2018
@MateuszKowalewski
Copy link

That does not look like something is broken.

repreporter is indeed not a member of scala.tools.nsc.interpreter.Repl. But reporter is. Dot-continuation works fine here:

Welcome to Scala 2.13.0-20181015-005141-f1916e3 (OpenJDK 64-Bit Server VM, Java 1.8.0_171).
Type in expressions for evaluation. Or try :help.

scala> $intp
res0: scala.tools.nsc.interpreter.Repl = scala.tools.nsc.interpreter.IMain@34045582

scala> .reporter
res1: scala.tools.nsc.interpreter.ReplReporter = scala.tools.nsc.interpreter.shell.ReplReporterImpl@5844a2d1

scala>

Could this issue just be closed? 😄

@som-snytt
Copy link
Author

The representation leaves something to be desired, but this is an example of hitting .toI<tab>.

scala 2.13.0-M5> 42
res1: Int = 42

scala 2.13.0-M5> .toItoInt
                      ^
                 error: value toItoInt is not a member of Int

scala 2.13.0-M5> 

So no, it's not closable.

@som-snytt
Copy link
Author

Maybe the bad caret is a clue for a good first issue solver. The caret is like totally wrong.

@som-snytt som-snytt changed the title REPL completion broken on dot continuation on 2.13 REPL completion completely broken on dot continuation on 2.13 Oct 16, 2018
@MateuszKowalewski
Copy link

Thank you for clarifying!

I'll look into this.

@MateuszKowalewski
Copy link

Short update:

I have implemented a fix for this this issue locally, and a related one I found during manual testing (tab expansion in dot-continuation wasn't working correctly in multiline input; which seams to be an old bug because it is reproducible in the old Scala 2.11.12 release; I didn't look for an related issue in the bug tracker until now but it's on the list).

I still have to write tests. Also I'm looking currently whether I implemented the fix in the right place. But have first to grok how the interpreter is actually working.

I'll submit a pull request for this issue soon.

@julienrf
Copy link

Hey @MateuszKowalewski, any update on this?

@MateuszKowalewski
Copy link

@julienrf I just had not enough spare time to finish this lately. I'm quite sorry about this!

Tests are still missing. The fix as it is works and was implemented already in the right spot (as far as I can tell after I had a deeper look into the inner workings of this thing).

I'll try to add the tests and submit a pull request in the next days.

Sorry once more for this very long delay. I thought that I have plenty of time to play around with the Scala compiler as I first looked into this issue. But then I got occupied with some quite important things.

@julienrf
Copy link

Hey @MateuszKowalewski, don’t be sorry! If you want you can already push your work to your fork and maybe someone from the community can help finishing it :)

@som-snytt
Copy link
Author

@MateuszKowalewski Feel free to PR what you have, I can follow up with a test. I am not occupied with any important things.

@NthPortal
Copy link

NthPortal commented Jul 7, 2019

@som-snytt I was about to finally get around to opening a ticket on this, only to discover it already exists

@som-snytt
Copy link
Author

@NthPortal Thanks again, for the nth time. I guess there was a reason it sounded familiar.

@SethTisue
Copy link
Member

this seems to have been gone away at some point, perhaps when we moved to JLine 3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants