diff options
author | Christopher Vogt <oss.nsp@cvogt.org> | 2016-09-28 08:46:41 -0400 |
---|---|---|
committer | Christopher Vogt <oss.nsp@cvogt.org> | 2016-09-28 10:37:45 -0400 |
commit | 5f8b831765ead443cf1f80078b7417c76e47e39b (patch) | |
tree | 3c77cc28133a9d26d0a4b9c6faebef95f5fa206a /stage2 | |
parent | 88d871ba309afc80971ded2095c630f01f965cdf (diff) | |
download | cbt-5f8b831765ead443cf1f80078b7417c76e47e39b.tar.gz cbt-5f8b831765ead443cf1f80078b7417c76e47e39b.tar.bz2 cbt-5f8b831765ead443cf1f80078b7417c76e47e39b.zip |
add dotty repl
Diffstat (limited to 'stage2')
-rw-r--r-- | stage2/plugins/Dotty.scala | 16 |
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], |