Support 2-blank-line-termination in REPL in Scala 3 #17712
Replies: 5 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. |
Beta Was this translation helpful? Give feedback.
-
Thanks for getting back with an answer. -- |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
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. 🚀 |
Beta Was this translation helpful? Give feedback.
-
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:
|
Beta Was this translation helpful? Give feedback.
-
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.
Beta Was this translation helpful? Give feedback.
All reactions