Getting StartedEdit this page on GitHub
Make sure that you are using Java 8: The output of
java -version should
1.8. Work to support Java 9 is
Start by cloning the repository:
$ git clone --recurse-submodules --single-branch https://github.com/lampepfl/dotty.git $ cd dotty $ sbt managedSources # Needed for IDE import to succeed
--single-branch to clone only the master branch, otherwise cloning will be much slower (details in issue #3236).
The repository uses submodules, which may need updating/initializing using
git submodule update --init. Starting
sbt will alert you if this is needed.
Dotty provides a standard sbt build: compiling, running and starting a repl can all be done from within sbt:
$ sbt > dotc tests/pos/HelloWorld.scala > dotr HelloWorld hello world
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
$ export PATH=$HOME/dotty/bin:$PATH
and you will be able to run the corresponding commands directly from your console:
# Compile code using Dotty $ dotc tests/pos/HelloWorld.scala # Run it with the proper classpath $ dotr HelloWorld
$ sbt > repl 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. scala>
or via bash:
To generate this page and other static page docs, run
$ sbt > genDocs
Before contributing to Dotty, we invite you to consult the Dotty Developer Guidelines.