Published 2024-08-17.
Time to read: 1 minutes.
scala-cli
replaced the Scala runner for Scala 3.5.0.
This only impacts people who use the Scala REPL instead of the
sbt
REPL,
or who use Scala Script, covered in Scala and Shell Scripts.
You can explicitly use Scala CLI to run a Scala REPL by typing:
$ scala-cli Welcome to Scala 3.4.2 (21.0.4, Java OpenJDK 64-Bit Server VM). Type in expressions for evaluation. Or try :help.
scala>
My computer had several versions of Scala installed via various means, including Scala 3.4.2 and 3.5.0, installed via Coursier. However, as you can see from the above, even Scala CLI chose to run Scala 3.4.2, even though 3.5.0 was the default.
Scala CLI was supposed to replace the Scala command for Scala 3.5.0, but I found the following:
$ scala-cli [warning] MainGenericRunner class is deprecated since Scala 3.5.0, and Scala CLI features will not work. [warning] Please be sure to update to the Scala CLI launcher to use the new features. [warning] It appears that your Coursier-based Scala installation is misconfigured. [warning] To update to the new Scala CLI runner, please update (coursier, cs) commands first before re-installing scala. [warning] Check the Scala 3.5.0 release notes to troubleshoot your installation. Welcome to Scala 3.5.0 (21.0.4, Java OpenJDK 64-Bit Server VM). Type in expressions for evaluation. Or try :help.
scala>
This is merely another example of the usual chaos in the Scala ecosystem.
© Copyright 1994-2024 Michael Slinn. All rights reserved.
If you would like to request to use this copyright-protected work in any manner,
please send an email.
This website was made using Jekyll and Mike Slinn’s Jekyll Plugins.