diff options
author | Guillaume Massé <masgui@gmail.com> | 2016-09-21 14:00:23 -0400 |
---|---|---|
committer | Guillaume Massé <masgui@gmail.com> | 2016-09-22 13:44:50 -0400 |
commit | 1e2bbb2c0bc7c9ba4bb626d4e45a5ab8519ec751 (patch) | |
tree | 93a2a5a47c044aedc64833960189ba4939adea39 /bridge/src/main/scala/xsbt/CompilerInterface.scala | |
parent | bcbc62ec8940fb9639da51778282cc805c23f84a (diff) | |
download | dotty-1e2bbb2c0bc7c9ba4bb626d4e45a5ab8519ec751.tar.gz dotty-1e2bbb2c0bc7c9ba4bb626d4e45a5ab8519ec751.tar.bz2 dotty-1e2bbb2c0bc7c9ba4bb626d4e45a5ab8519ec751.zip |
delegate compilation info to sbt reporter
Diffstat (limited to 'bridge/src/main/scala/xsbt/CompilerInterface.scala')
-rw-r--r-- | bridge/src/main/scala/xsbt/CompilerInterface.scala | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bridge/src/main/scala/xsbt/CompilerInterface.scala b/bridge/src/main/scala/xsbt/CompilerInterface.scala index ee272b8b1..bf1488dad 100644 --- a/bridge/src/main/scala/xsbt/CompilerInterface.scala +++ b/bridge/src/main/scala/xsbt/CompilerInterface.scala @@ -50,12 +50,14 @@ class CachedCompilerImpl(args: Array[String], output: Output, resident: Boolean) (outputArgs ++ args.toList ++ sources.map(_.getAbsolutePath).sortWith(_ < _)).toArray[String] def run(sources: Array[File], changes: DependencyChanges, callback: AnalysisCallback, log: Logger, delegate: Reporter, progress: CompileProgress): Unit = synchronized { - run(sources.toList, changes, callback, log, progress) + run(sources.toList, changes, callback, log, delegate, progress) } - private[this] def run(sources: List[File], changes: DependencyChanges, callback: AnalysisCallback, log: Logger, compileProgress: CompileProgress): Unit = { + private[this] def run(sources: List[File], changes: DependencyChanges, callback: AnalysisCallback, log: Logger, delegate: Reporter, compileProgress: CompileProgress): Unit = { debug(log, args.mkString("Calling Dotty compiler with arguments (CompilerInterface):\n\t", "\n\t", "")) val ctx = (new ContextBase).initialCtx.fresh .setSbtCallback(callback) + .setReporter(new DelegatingReporter(delegate)) + val cl = getClass.getClassLoader.asInstanceOf[URLClassLoader] val reporter = DottyMain.process(commandArguments(sources.toArray), ctx) |