6

When trying to use the scala interpreter in the terminal I am experiencing a weird issue, when I try to write, the cursor does not move, although after I press enter it "works".

This is what I should see:

Welcome to Scala 2.11.12 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_171).
Type in expressions for evaluation. Or try :help.

scala> val x = 1
x: Int = 1

This is what I actually see:

Welcome to Scala 2.11.12 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_171).
Type in expressions for evaluation. Or try :help.

scala> x: Int = 1

All in all, I cannot see what I write.

This only happens with this interpreter, every other program/functionality from the terminal seems to be working just fine.

It happened after I upgraded to 18.04 and replaced the JVM to 8.

  • Possibly somewhat related: [REPL does not show input (Windows)](https://issues.scala-lang.org/browse/SI-9434). That's not exactly the latest scala-version, though. Can you upgrade to something like 2.12.6? Is it tied to Spark versions in some way? That's quite strange, I've tried it with at least half a dozen different linux distros in past few years, never had any problems with that. Consider adding more information about the terminal emulator that you're using. – Andrey Tyukin May 14 '18 at 16:14
  • See [this issue](https://github.com/sbt/sbt/issues/3240) (although this is about `sbt` someone says it also affects using the `scala` REPL on its own). This is apparently fixed in scala 2.12.3+. For a workaround with older versions try `export TERM=xterm-color scala # or sbt`. – Marth May 14 '18 at 17:04
  • The upgrade to jline 2.14.4 is indeed on 2.12.3. Probably they didn't upgrade on 2.11.x because they thought it was EOL already. – som-snytt May 14 '18 at 22:55

1 Answers1

1

After I upgraded to Scala 2.12.6 it started working again.

Welcome to Scala 2.12.6 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_171).
Type in expressions for evaluation. Or try :help.

scala> val nowISeeWhatIWrite = true
nowISeeWhatIWrite: Boolean = true

Still not sure why the older version stopped working.