Skip to content

The -print-lines option disables tab completion in REPL #14227

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

Closed
adpi2 opened this issue Jan 7, 2022 · 8 comments
Closed

The -print-lines option disables tab completion in REPL #14227

adpi2 opened this issue Jan 7, 2022 · 8 comments
Labels

Comments

@adpi2
Copy link
Member

adpi2 commented Jan 7, 2022

Originally reported in sbt/sbt#6780 by @jhnaldo

Compiler version

3.1.0

Minimized code

$ scala3-repl -print-lines
Welcome to Scala 3.1.0 (1.8.0_275, Java OpenJDK 64-Bit Server VM).
Type in expressions for evaluation. Or try :help.
                                                                                
scala> val hello = 42
     |val hello: Int = 42
                                                                                
scala>hel<TAB>

Tab completion does not work.

Expectation

Tab completion should work when -print-lines is turned on.

@tgodzik
Copy link
Contributor

tgodzik commented Mar 21, 2022

This also impacts a bunch of other features related to IDEs

@tgodzik tgodzik added the Spree Suitable for a future Spree label Mar 23, 2022
@tgodzik
Copy link
Contributor

tgodzik commented Mar 23, 2022

This should be great for the Spree

@smarter
Copy link
Member

smarter commented Mar 24, 2022

... what is -print-lines supposed to do? Can we remove it? 😅

@tgodzik
Copy link
Contributor

tgodzik commented Mar 24, 2022

Apparently it adds line numbers: Show source code line numbers.

@smarter
Copy link
Member

smarter commented Mar 24, 2022

But where? I didn't see any difference in the error output

@tgodzik
Copy link
Contributor

tgodzik commented Mar 24, 2022

But where? I didn't see any difference in the error output

Seems it was added for decompiling code here: #3523

Not sure why would anyone add it to their normal scalac settings though.

@ValeriePe
Copy link

This issue was picked for the Issue Spree n°20 of September 6th which takes place in a week from now. @SethTisue @mbovel @markehammons will be working on it. If you have any insight into the issue or guidance on how to fix it, please leave it here.

@SethTisue
Copy link
Member

Seem to be fixed in 3.2.0. I can reproduce it with scala-cli repl -S 3.1.0 -O -print-lines but not with scala-cli repl -S 3.2.0 -O -print-lines.

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

No branches or pull requests

5 participants