Before digging into an issue or starting on a new feature it's a good idea to make sure an issue or a discussion has been created outlining what you plan to work on. This is both for your and the team's benefit. It ensures you get the help you need, and also gives the compiler team a heads-up that someone is working on an issue.
For some small changes like documentation, this isn't always necessary, but it's never a bad idea to check.
- git is essential for managing the Scala 3 code, and contributing to GitHub, where the code is hosted.
- A Java Virtual Machine (JDK 8 or higher), required for running the build tool.
- There are multiple ways to get and manage different Java versions. Some popular options are:
- Verify that the JVM is installed by running the following command in a terminal:
- sbt, the build tool required to build the Scala 3 compiler and libraries.
An IDE, such as Metals will help you develop in Scala 3 with features such as autocompletion, code navigation, debugging, and interactive worksheets.
Another popular options is IntelliJ IDEA for Scala.
Start by cloning the repository:
$ git clone https://github.com/lampepfl/dotty.git
$ cd dotty
Dotty provides a standard sbt build: compiling, running and starting a repl can all be done from within sbt:
> scalac tests/pos/HelloWorld.scala
> scala HelloWorld
There are also bash scripts that can be used in the same way. Assuming that you have cloned the Dotty repo locally, append the following line on your
.bash_profile, or equivalent for your shell:
$ export PATH=<path to cloned dotty>/bin:$PATH
and you will be able to run the corresponding commands directly from your console:
# Compile code using Dotty
$ scalac tests/pos/HelloWorld.scala
# Run it with the proper classpath
$ scala HelloWorld
Welcome to Scala.next (pre-alpha) (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_101).
Type in expressions to have them evaluated.
Type :help for more information.
or via bash:
To test our cloned compiler on local projects:
$ sbt publishLocal
Then in the
build.sbt file of a test project:
ThisBuild / scalaVersion := "<dotty-version>-bin-SNAPSHOT"
dotty-version can be found in the file
To generate this page and other static page docs, run
For more information, see the scaladoc section.
The main development discussion channels are: