aboutsummaryrefslogtreecommitdiff
path: root/stage2/plugins/Dotty.scala
diff options
context:
space:
mode:
Diffstat (limited to 'stage2/plugins/Dotty.scala')
-rw-r--r--stage2/plugins/Dotty.scala16
1 files changed, 16 insertions, 0 deletions
diff --git a/stage2/plugins/Dotty.scala b/stage2/plugins/Dotty.scala
index 0a5d91d..53cff6e 100644
--- a/stage2/plugins/Dotty.scala
+++ b/stage2/plugins/Dotty.scala
@@ -22,6 +22,8 @@ trait Dotty extends BaseBuild{
)
}
+ def repl = dottyLib.repl(context.args, classpath)
+
override def dependencies = Resolver(mavenCentral).bind(
ScalaDependency( "org.scala-lang.modules", "scala-java8-compat", "0.8.0-RC7" )
)
@@ -42,6 +44,20 @@ class DottyLib(
MavenDependency("ch.epfl.lamp","dotty_2.11",dottyVersion)
)
+ def repl(args: Seq[String], classpath: ClassPath) = {
+ consoleOrFail("Use `cbt direct repl` instead")
+ lib.runMain(
+ "dotty.tools.dotc.repl.Main",
+ Seq(
+ "-bootclasspath",
+ dottyDependency.classpath.string,
+ "-classpath",
+ classpath.string
+ ) ++ args,
+ dottyDependency.classLoader(classLoaderCache)
+ )
+ }
+
def compile(
needsRecompile: Boolean,
files: Seq[File],