question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

cs does not install scala runner for scala 3

See original GitHub issue

See https://github.com/lampepfl/dotty/issues/12811

Minimized example

Follow the official document Scala 3 Book, run the simple “Hello, world” example through scala3-repl.

In the file hello.scala, write

@main def hello = println("Hello, world!")

Then

scala3-compiler hello.scala
scala3-repl hello

The scala3-repl was installed through Coursier, as suggested by the official webpage Download Scala 3

Output

NO output.

The scala3-repl get into the interactive mode directly without any output.

Expectation

A runner for scala3 should be installed, e.g.

scala3 hello

should produce "Hello, world!" as output, the same as in Scala 2.

Even better would be if we could control which version is currently associated with the scala and scalac commands and that the work with either Scala 2 or Scala 3 depending on a version switch by some cs command. This way we don’t need different names of the runners, with an incosistent naming scheme (scala not scala2 or scala3).

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:7
  • Comments:41 (10 by maintainers)

github_iconTop GitHub Comments

5reactions
bjornregnellcommented, Jun 16, 2021

This is a showstopper for me to use cs in my teaching. And there is no .msi for Scala 3 so I’m more or less stuck (manually unpackaging a zip and going into environment variables to fiddle with path etc in Windows is not very attractive beginner programmer user experience…)

2reactions
sjrdcommented, Nov 12, 2021

Equivalent steps work on Windows as well 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting Started - Scala Documentation
The Scala installer is a tool named Coursier, whose main command is named cs . It ensures that a JVM and standard Scala...
Read more >
cs does not install scala runner for scala 3 - Bountysource
Minimized example. Follow the official document Scala 3 Book, run the simple "Hello, world" example through scala3-repl. In the file hello.scala ...
Read more >
How to run Scala 3 applications in the command line with ...
Currently there does not seem to be a way to launch a runner for Scala 3 using coursier, see this issue. As a...
Read more >
Disappointing Scala 3 Installation Experience - Mike Slinn
Installing Scala 3 is a completely Different experience than previous Scala versions.
Read more >
install - Coursier
This can be used to install a specific version of Scala itself: $ cs install scala:2.12.15 scalac:2.12.15 $ scala -version Scala code runner...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found