Getting Started - smarter/dotty GitHub Wiki
To get started:
Fork and clone the repository on your machine:
git clone [email protected]:<your github username>/dotty.git
cd dotty
You need to have scala source in "../scala"
And then, in the console:
sbt compile
sbt run
sbt test
If tests fail with such message
***** scanning ../scala/src/compiler/scala/tools/nsc/doc/html/page/Template.scala
[error] Test test.ScannerTest.scanScala failed: unclosed character literal
[error] at dotty.tools.dotc.reporting.Reporter$.Diagnostic(Reporter.scala:42)
[error] at dotty.tools.dotc.reporting.Reporting$class.error(Reporter.scala:103)
[error] at dotty.tools.dotc.core.Contexts$Context.error(Contexts.scala:50)
[error] at dotty.tools.dotc.parsing.Scanners$Scanner.error(Scanners.scala:937)
[error] at dotty.tools.dotc.parsing.Scanners$Scanner.fetchSingleQuote$1(Scanners.scala:373)
[error] at dotty.tools.dotc.parsing.Scanners$Scanner.fetchToken(Scanners.scala:377)
[error] at dotty.tools.dotc.parsing.Scanners$Scanner.nextToken(Scanners.scala:169)
[error] at test.ScannerTest.scan(ScannerTest.scala:25)
it means that you have and old scala/scala clone(probably pre 2.11). Updating it to current master should fix this error.
To use the Scala IDE:
Run sbt eclipse
to generate the project definition files.
Notes:
- Download the Bundle of the Scala IDE for Eclipse for Scala 2.11.
- Alternatively, download Eclipse Standard 4.3.x (Kepler) or 4.2.x (Juno) and install the Scala IDE for Scala 2.11.
- There are 2 spurious version incompatibility warnings
- To run dotty in Eclipse:
- Navigate to
dotty.tools.dotc.Main
Run As...
>Scala Application
- then go to
Run Configurations
>Main$
>Classpath
>Bootstrap entries
:- add the Scala library (
Advanced...
>Add library...
>Scala library
) - add the dotty classfiles (
Add projects...
>[x] dotty
)
- add the Scala library (
- then go to
Run Configurations
>Main$
>Arguments
and add${project_loc}/examples/hello.scala
- Navigate to