This commit is contained in:
Mark Harrah 2013-04-12 12:47:44 -04:00
parent 81babda6f6
commit 36c8326625
6 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,3 @@
object Use {
val x = A.x
}

View File

@ -0,0 +1,4 @@
// this is the source for the compiled class in a.jar
public class A {
public static final int x = 3;
}

View File

@ -0,0 +1,10 @@
import complete.DefaultParsers._
val checkIterations = inputKey[Unit]("Verifies the accumlated number of iterations of incremental compilation.")
checkIterations := {
val expected: Int = (Space ~> NatBasic).parsed
val actual: Int = (compile in Compile).value.compilations.allCompilations.size
assert(expected == actual, s"Expected $expected compilations, got $actual")
}

View File

@ -0,0 +1 @@
../actual/a.jar

View File

@ -0,0 +1,10 @@
# Tests that classpath entries that are different than their canonical representation are
# handled properly. In particular, a symlink from lib/a.jar to lib/../actual/a.jar.0 is
# available on the classpath and read by scalac. scalac 2.10.x does not interpret .jar.0
# as a jar, so if sbt passes the canonical path, it will not be read.
# This also verifies that compilation does not get repeatedly triggered by a mismatch in
# paths.
> compile
> compile
> checkIterations 1