diff --git a/compile/interface/ConsoleInterface.scala b/compile/interface/ConsoleInterface.scala index c7140adac..b56e3c345 100644 --- a/compile/interface/ConsoleInterface.scala +++ b/compile/interface/ConsoleInterface.scala @@ -14,8 +14,8 @@ class ConsoleInterface def run(args: Array[String], bootClasspathString: String, classpathString: String, initialCommands: String, loader: ClassLoader, bindNames: Array[String], bindValues: Array[Any], log: Logger) { val options = args.toList - lazy val interpreterSettings = xsbt.MakeSettings(options, log) - val compilerSettings = xsbt.MakeSettings(options, log) + lazy val interpreterSettings = MakeSettings.sync(options, log) + val compilerSettings = MakeSettings.sync(options, log) if(!bootClasspathString.isEmpty) compilerSettings.bootclasspath.value = bootClasspathString @@ -61,4 +61,18 @@ object MakeSettings else throw new InterfaceCompileFailed(Array(), Array(), command.usageMsg) } + + def sync(options: List[String], log: Logger) = + { + val settings = apply(options, log) + + // -Yrepl-sync is only in 2.9.1+ + final class Compat { + def Yreplsync = settings.BooleanSetting("-Yrepl-sync", "For compatibility only.") + } + implicit def compat(s: Settings): Compat = new Compat + + settings.Yreplsync.value = true + settings + } } diff --git a/main/ConsoleProject.scala b/main/ConsoleProject.scala index 8f999cb9d..de84f5e56 100644 --- a/main/ConsoleProject.scala +++ b/main/ConsoleProject.scala @@ -8,7 +8,7 @@ package sbt object ConsoleProject { - def apply(state: State, extra: String, options: Seq[String] = "-Yrepl-sync" :: Nil)(implicit log: Logger) + def apply(state: State, extra: String, options: Seq[String] = Nil)(implicit log: Logger) { val extracted = Project extract state val bindings = ("currentState" -> state) :: ("extracted" -> extracted ) :: Nil