Scala worksheet does not work with Intellij 2019

I am trying out scala for the first time and am following this page to set upmy first scala project : https://docs.scala-lang.org/getting-started-intellij-track/getting-started-with-scala-in-intellij.html

However despite this on creating a simple worksheet with println(“hello”) upon evaluation no results come up. What am I doing wrong ?

1 Like

Have you pressed “Play” (green triangle) again after adding the new line and/or configured “interactive mode” via the wrench? If that doesn’t work, are there any error messages/popups when you press “Play”?

Yup, tried all that. Nothing seems to work.
No error messages as well.

Capture2

1 Like

Scala Worksheets do not work with newer Scala versions.

Scala 2.11.8 w/ JDK 8(1.8) worked for me personally, whereas 2.13.0 w/ JDK 8 gave zero output and zero error codes.

Other versions may work as well, but I haven’t tried.

There was a known bug that is supposed to be fixed in the subsequent builds. Could you please tell the version of the Scala plugin (Settings | Plugins | Scala)? Or better yet, please try to update the Scala plugin and see whether that fixes the problem.

1 Like

Was on Scala Plugin version 2019.2.20; upgraded to 2019.2.23.

The issue now seems resolved.

Confirmed working with:

  • Ubuntu Linux 19.04
  • Intellij Ultimate 2019.2.1
  • Scala Plugin 2019.2.23
  • Java 8
  • Scala 2.13.0

It’s strange, I could have sworn I checked for plugin updates a couple of days ago but none were present. Possibly due to the fact that my IntelliJ comes from a snap? Or maybe I am just inept.

Thank you for the help @pavelfatin

Still does not work for me: the same behaviour as reported by OP (no output)

Intellij EAP 2019.3 (193.3519.25)
Scala Plugin: 2019.3.4

@pavelfatin: do you have a link to this known bug? curious about the details.

Looks like a regression: I’m getting the same problem with

  • IntelliJ Ultimate 2019.2.3
  • Scala plugin 2019.2.28 and 2019.2.23 (downgraded to check)

Everything worked until the latest IntelliJ upgrade.