Add Java class file version to compiler interface ID so that it is recompiled when moving between Java versions.

This commit is contained in:
Mark Harrah 2009-12-29 22:14:56 -05:00
parent 31c47192ee
commit b63b955dca
3 changed files with 5 additions and 4 deletions

View File

@ -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

View File

@ -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)

View File

@ -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