This is a normal sbt project, you can compile code with sbt compile
and run it
with sbt run
, sbt console
will start a Scala 3 REPL.
If compiling this example project fails, you probably have a global sbt plugin
that does not work with Scala 3, try to disable all plugins in
~/.sbt/1.0/plugins
and ~/.sbt/1.0
.
Scala 3 comes built-in with IDE support, to try it out see IDE support for Scala 3
The fastest way to start a new Scala 3 project is to use one of the following templates:
You will need to make the following adjustments to your build:
sbt.version=1.5.3
You must use sbt 1.5.3 or newer; older versions of sbt are not supported.
Set up the Scala 3 version:
scalaVersion := "3.0.0"
For help with porting an existing Scala 2 project to Scala 3, see the Scala 3 migration guide.
If the latest release of Scala 3 is missing a bugfix or feature you need, you may wish to use a nightly build. Look at the bottom of the list of releases to find the version number for the latest nightly build.
Feel free to come chat with us on the Scala 3 gitter!