From b63b955dcaadd878b4e42fe8b36e05545323a2bd Mon Sep 17 00:00:00 2001 From: Mark Harrah Date: Tue, 29 Dec 2009 22:14:56 -0500 Subject: [PATCH] Add Java class file version to compiler interface ID so that it is recompiled when moving between Java versions. --- compile/ComponentCompiler.scala | 3 ++- launch/src/main/resources/sbt/sbt.boot.properties | 2 +- project/build.properties | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/compile/ComponentCompiler.scala b/compile/ComponentCompiler.scala index fc99ca7fc..2984d3658 100644 --- a/compile/ComponentCompiler.scala +++ b/compile/ComponentCompiler.scala @@ -9,6 +9,7 @@ object ComponentCompiler val binSeparator = "-bin_" val compilerInterfaceID = "compiler-interface" val compilerInterfaceSrcID = compilerInterfaceID + srcExtension + val javaVersion = System.getProperty("java.class.version") } /** This class provides source components compiled with the provided RawCompiler. * The compiled classes are cached using the provided component manager according @@ -23,7 +24,7 @@ class ComponentCompiler(compiler: RawCompiler, manager: ComponentManager) manager.file(binID)( new IfMissing.Define(true, compileAndInstall(id, binID)) ) } def clearCache(id: String): Unit = manager.clearCache(binaryID(id)) - protected def binaryID(id: String) = id + binSeparator + compiler.scalaInstance.actualVersion + protected def binaryID(id: String) = id + binSeparator + compiler.scalaInstance.actualVersion + "__" + javaVersion protected def compileAndInstall(id: String, binID: String) { val srcID = id + srcExtension diff --git a/launch/src/main/resources/sbt/sbt.boot.properties b/launch/src/main/resources/sbt/sbt.boot.properties index 5ec4152ac..767508b9c 100644 --- a/launch/src/main/resources/sbt/sbt.boot.properties +++ b/launch/src/main/resources/sbt/sbt.boot.properties @@ -33,6 +33,6 @@ project.version: quick=set(1.0), new=prompt(Version)[1.0], fill=prompt(Version)[1.0] def.scala.version: quick=set(2.7.7), new=set(2.7.7), fill=set(2.7.7) build.scala.versions: quick=set(2.7.7), new=prompt(Scala version)[2.7.7], fill=prompt(Scala version)[2.7.7] - sbt.version: quick=set(0.6.8), new=prompt(sbt version)[0.6.8], fill=prompt(sbt version)[0.6.8] + sbt.version: quick=set(0.6.9), new=prompt(sbt version)[0.6.9], fill=prompt(sbt version)[0.6.9] project.scratch: quick=set(true) project.initialize: quick=set(true), new=set(true) \ No newline at end of file diff --git a/project/build.properties b/project/build.properties index 729906123..30653cb29 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1,7 +1,7 @@ #Project properties -#Sun Dec 20 23:25:47 EST 2009 +#Tue Dec 29 21:21:49 EST 2009 project.organization=org.scala-tools.sbt project.name=xsbt sbt.version=0.5.6 -project.version=0.6.9-SNAPSHOT +project.version=0.6.9 scala.version=2.7.7