use -Yrepl-sync for console-project to avoid deadlock on REPL startup in 2.9

This commit is contained in:
Mark Harrah 2011-08-19 22:13:56 -04:00
parent 6ea27e893b
commit 49b85384e7
1 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@ package sbt
object ConsoleProject
{
def apply(state: State, extra: String)(implicit log: Logger)
def apply(state: State, extra: String, options: Seq[String] = "-Yrepl-sync" :: Nil)(implicit log: Logger)
{
val extracted = Project extract state
val bindings = ("currentState" -> state) :: ("extracted" -> extracted ) :: Nil
@ -17,6 +17,6 @@ object ConsoleProject
val imports = Load.getImports(unit.unit) ++ Load.importAll(bindings.map(_._1))
val importString = imports.mkString("", ";\n", ";\n\n")
val initCommands = importString + extra
(new Console(compiler))(unit.classpath, Nil, initCommands)(Some(unit.loader), bindings)
(new Console(compiler))(unit.classpath, options, initCommands)(Some(unit.loader), bindings)
}
}