-
Notifications
You must be signed in to change notification settings - Fork 1.1k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Support 2-blank-line-termination in REPL in Scala 3 #17711
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
Comments
I think this was deemed unnecessary because of magic JLine editing capabilities, but I can't find the ticket or conversation. I also thought ctl-c was supported, but for me it exits the REPL. |
Thanks for getting back with an answer. -- |
If I could guess why this occurs it would be to support optional braces syntax - however to see 7 blank lines before any code is a bit absurd :) Edit: I mean absurd for REPL to accept 7 blank lines as intentional code |
Not absurd at all, those seven blank lines were meant to showcase enter was hit n (Seven in this case) number of times without the REPL terminating the statement as intended. Well, good luck buds. 🚀 |
Scala 2 lost this behavior around the time the JLine 3 upgrade landed (scala/bug#12266), but Dale and I restored it in scala/scala#9407 as discussed at 12266, control-G also works for noping out (including in Scala 3), so that's a workaround for now though as I wrote there:
|
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Hello, I was trying to terminate a statement pressing enter twice but it only works for Scala 2, can you please make it available for Scala 3 over Java 17 too?
Here's a screenshot depicting the issue both with SBT and the Scala 3 standalone application.

And here's a successful execution within Scala 2.

Java Virtual Machine Information:
java 17.0.3.1 2022-04-22 LTS
Java(TM) SE Runtime Environment (build 17.0.3.1+2-LTS-6)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.3.1+2-LTS-6, mixed mode, sharing)
Thanks!
--
Caleb.
The text was updated successfully, but these errors were encountered: