aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/scala/tools/nsc/io/package.scala
diff options
context:
space:
mode:
authorGuillaume Martres <smarter@ubuntu.com>2017-02-16 18:58:58 +0100
committerGuillaume Martres <smarter@ubuntu.com>2017-04-13 19:41:44 +0200
commit476778612e71379cf648693f7d02039301fb5607 (patch)
treea6d27763253f9de38ba03e155450039c9b6cead5 /compiler/src/scala/tools/nsc/io/package.scala
parent0fe56ea73e6775a315f54772dc6bfb40815c7c98 (diff)
downloaddotty-476778612e71379cf648693f7d02039301fb5607.tar.gz
dotty-476778612e71379cf648693f7d02039301fb5607.tar.bz2
dotty-476778612e71379cf648693f7d02039301fb5607.zip
Fix #2184: Hyper Bootstrap! Integrate the backend as a git submodule
The backend lives in the scalac fork at https://github.com/lampepfl/scala/tree/sharing-backend. Before this commit, the scala-compiler built from this fork was a dependency of Scala just to get this backend. This made it much more cumbersome to test changes to the backend and also forced us to depend on Scala 2.11.5 since that is the version of scalac that the forked backend is based on. This commit changes this by adding a git submodule in the `scala-backend` directory that points to the scalac fork. We do not compile the whole submodule, instead we add the subset of files we need to the dotty-compiler project in the sbt build. See backend.md for more information (online at http://dotty.epfl.ch/docs/contributing/backend.html) once this commit is merged. The most important thing to note is that whenever you clone dotty you should do `git clone --recursive` to also clone the submodule. If you already have a cloned dotty you'll need to do: git submodule update --init You will need to repeat this command anytime you update dotty and the backend has been updated, otherwise the content of `scala-backend` will be stale.
Diffstat (limited to 'compiler/src/scala/tools/nsc/io/package.scala')
-rw-r--r--compiler/src/scala/tools/nsc/io/package.scala27
1 files changed, 27 insertions, 0 deletions
diff --git a/compiler/src/scala/tools/nsc/io/package.scala b/compiler/src/scala/tools/nsc/io/package.scala
new file mode 100644
index 000000000..6b30e5441
--- /dev/null
+++ b/compiler/src/scala/tools/nsc/io/package.scala
@@ -0,0 +1,27 @@
+package scala.tools.nsc
+
+/**
+ * Compatibility layer needed for the backend.
+ *
+ * Our backend is based on the Scala 2.11 GenBCode backend and modified so that
+ * it compiles both with dotty and scalac, since the backend uses
+ * scala.tools.nsc.io.*, we need to also provide it.
+ *
+ * See http://dotty.epfl.ch/docs/contributing/backend.html for more information.
+ */
+package object io {
+ type AbstractFile = scala.reflect.io.AbstractFile
+ val AbstractFile = scala.reflect.io.AbstractFile
+
+ type Directory = scala.reflect.io.Directory
+ val Directory = scala.reflect.io.Directory
+
+ type Path = scala.reflect.io.Path
+ val Path = scala.reflect.io.Path
+
+ type File = scala.reflect.io.File
+ val File = scala.reflect.io.File
+
+ type Jar = dotty.tools.io.Jar
+ val Jar = dotty.tools.io.Jar
+}