diff --git a/compile/interface/CompilerInterface.scala b/compile/interface/CompilerInterface.scala index 01f3a10ef..b2103864a 100644 --- a/compile/interface/CompilerInterface.scala +++ b/compile/interface/CompilerInterface.scala @@ -36,12 +36,18 @@ class CompilerInterface def newPhase(prev: Phase) = analyzer.newPhase(prev) def name = phaseName } - override def computePhaseDescriptors = // done this way for compatibility between 2.7 and 2.8 + override lazy val phaseDescriptors = // done this way for compatibility between 2.7 and 2.8 { phasesSet += sbtAnalyzer - val superd = super.computePhaseDescriptors + val superd = superComputePhaseDescriptors if(superd.contains(sbtAnalyzer)) superd else ( superd ++ List(sbtAnalyzer) ).toList } + private def superComputePhaseDescriptors() = // required because 2.8 makes computePhaseDescriptors private + { + val meth = classOf[Global].getDeclaredMethod("computePhaseDescriptors") + meth.setAccessible(true) + meth.invoke(this).asInstanceOf[List[SubComponent]] + } trait Compat27 { val runsBefore: List[String] = Nil } } if(!reporter.hasErrors) diff --git a/compile/src/test/scala/CompileTest.scala b/compile/src/test/scala/CompileTest.scala index ecae21cba..92d0a1c07 100644 --- a/compile/src/test/scala/CompileTest.scala +++ b/compile/src/test/scala/CompileTest.scala @@ -36,7 +36,7 @@ object WithCompiler log.bufferQuietly { boot.LaunchTest.withLauncher { launch => FileUtilities.withTemporaryDirectory { componentDirectory => - val manager = new ComponentManager(new boot.ComponentProvider(componentDirectory), log) + val manager = new ComponentManager(xsbt.boot.Locks, new boot.ComponentProvider(componentDirectory), log) val compiler = new AnalyzingCompiler(ScalaInstance(scalaVersion, launch), manager) compiler.newComponentCompiler(log).clearCache(ComponentCompiler.compilerInterfaceID) prepare(manager, ComponentCompiler.compilerInterfaceSrcID, "CompilerInterface.scala")