From 4fd7611074379d26ed297f68c8d60d626b69f886 Mon Sep 17 00:00:00 2001 From: Mark Harrah Date: Wed, 24 Nov 2010 14:05:26 -0500 Subject: [PATCH] add jline jar to classpath for :power mode --- compile/AnalyzingCompiler.scala | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/compile/AnalyzingCompiler.scala b/compile/AnalyzingCompiler.scala index e858ee6a1..3ca3add3d 100644 --- a/compile/AnalyzingCompiler.scala +++ b/compile/AnalyzingCompiler.scala @@ -41,7 +41,7 @@ class AnalyzingCompiler(val scalaInstance: ScalaInstance, val manager: Component def console(classpath: Seq[File], options: Seq[String], initialCommands: String, log: Logger)(loader: Option[ClassLoader] = None, bindings: Seq[(String, Any)] = Nil): Unit = { val arguments = new CompilerArguments(scalaInstance, cp) - val classpathString = CompilerArguments.absString(arguments.finishClasspath(classpath)) + val classpathString = CompilerArguments.absString(arguments.finishClasspath(classpath ++ jlineJar)) val bootClasspath = if(cp.autoBoot) arguments.createBootClasspath else "" val (names, values) = bindings.unzip call("xsbt.ConsoleInterface", log)( @@ -80,4 +80,7 @@ class AnalyzingCompiler(val scalaInstance: ScalaInstance, val manager: Component new classpath.DualLoader(scalaLoader, notXsbtiFilter, x => true, sbtLoader, xsbtiFilter, x => false) } override def toString = "Analyzing compiler (Scala " + scalaInstance.actualVersion + ")" + lazy val jlineJar = + try { IO.classLocationFile[jline.ConsoleReader] :: Nil } + catch { case e: Exception => Nil } } \ No newline at end of file