Is there away to upgrade the installed Scala version via sbt / other command line tool?
I'm sure there is a way, but I couldn't find any after a quick search, am I missing anything?
Install it on your system with the following instructions. Download and execute the Scala installer for Windows based on Coursier, and follow the on-screen instructions. JavaScript is disabled, click the tab relevant for your OS. Follow the documentation from Coursier on how to install and run cs setup .
Check Scala Version Using scala CommandWrite the scala command to your terminal and press enter. After that, it opens Scala interpreter with a welcome message and Scala version and JVM details.
Each SBT project specifies the version of Scala to use to compile and run its code. It defaults to being the version of Scala that SBT uses internally, but is always overridable.
E.g.
scalaVersion := "2.10.0"
As Connor Doyle mentioned, if your OS has a package system that includes Scala (some Linux distros I know of do) and you are, for some reason obligated to use that, you are pretty much at their mercy to provide a new version on a timely basis. The Scala Web Site (downloads here) provides a variety of installers and tarballs / Zip archives for every release they've made.
Mac OS X users can use HomeBrew to get up-to-date SBT and Scala.
To set the project version temporarily from the command line:
++ 2.10.4
To set the project version permanently from the command line:
set scalaVersion := "2.10.4"
session save
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With