Building Dotty with Eclipse
Build setup
You may need to redo these steps when the build changes.
- Run
sbt eclipse -
In dotty, go to
Properties > java build path > Libraries. Remove the Scala Compiler container (currently 2.11.4) and add as an external jar the latest compiler version in the Ivy cache. This is currently:.ivy2/cache/me.d-d/scala-compiler/jars/scala-compiler-2.11.5-20160322-171045-e19b30b3cd.jarBut that might change in the future. Or, copy the latest scala compiler from the cache to a stable name and use that as external jar.
- It is recommended to change the default output folder (in
Properties > java build path > Source) todotty/classesinstead ofdotty/binbecausedotty/binis reserved for shell scripts.
If you have CLASSPATH defined:
-
Update your classpath to contain any new required external libraries to run
./bin/dotc,./bin/dotroutside of Eclipse. - Open the
Run Configurationstab, and edit thetestsconfiguration so that it contains aCLASSPATHvariable which reflects the currentCLASSPATH.
In order for compilation errors related to ENUM to be resolved, make sure
that scala-reflect 2.11.5 is on the classpath.
Running the compiler Main class from Eclipse
- Navigate to
dotty.tools.dotc.Main Run As... > Scala ApplicationRun 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 (
Run Configurations > Main$ > Argumentsand add${project_loc}/tests/pos/HelloWorld.scala