mirror of https://github.com/sbt/sbt.git
Split compiler bridge tests to another subproject
Splitting compiler bridge tests to another subproject because while the bridge itself can be compiled with just compiler-interface, util-interface, and Scala Compiler as dependencies, the testing introduces more (such as IO). This creates problem for new Scala versions where IO or test libraries do not exist yet (e.g. Scala 2.13.0-M2). This also removes the Mima test due to the lack of 2.13 bridge for Zinc 1.0.0. Compiler bridge just needs to compile itself against the interface and Scala compiler, so there's no need to run Mima test.
This commit is contained in:
parent
1c1ba43ed1
commit
282b0f7f51
|
|
@ -42,9 +42,12 @@ private[sbt] object ZincComponentCompiler {
|
|||
def compilerBridgeId(scalaVersion: String) = {
|
||||
// Defaults to bridge for 2.12 for Scala versions bigger than 2.12.x
|
||||
scalaVersion match {
|
||||
case sc if (sc startsWith "2.10.") => "compiler-bridge_2.10"
|
||||
case sc if (sc startsWith "2.11.") => "compiler-bridge_2.11"
|
||||
case _ => "compiler-bridge_2.12"
|
||||
case sc if (sc startsWith "2.10.") => "compiler-bridge_2.10"
|
||||
case sc if (sc startsWith "2.11.") => "compiler-bridge_2.11"
|
||||
case sc if (sc startsWith "2.12.") => "compiler-bridge_2.12"
|
||||
case sc if (sc startsWith "2.13.0-M") => "compiler-bridge_2.13.0-M2"
|
||||
case sc if (sc startsWith "2.13.0-RC") => "compiler-bridge_2.13.0-M2"
|
||||
case _ => "compiler-bridge_2.13"
|
||||
}
|
||||
}
|
||||
import xsbti.ArtifactInfo.SbtOrganization
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ class ZincComponentCompilerSpec extends BridgeProviderSpecification {
|
|||
val scala2121 = "2.12.1"
|
||||
val scala2122 = "2.12.2"
|
||||
val scala2123 = "2.12.3"
|
||||
val scala2130M2 = "2.13.0-M2"
|
||||
|
||||
val logger = ConsoleLogger()
|
||||
it should "compile the bridge for Scala 2.10.5 and 2.10.6" in {
|
||||
|
|
@ -28,4 +29,8 @@ class ZincComponentCompilerSpec extends BridgeProviderSpecification {
|
|||
IO.withTemporaryDirectory(t => getCompilerBridge(t, logger, scala2122) should exist)
|
||||
IO.withTemporaryDirectory(t => getCompilerBridge(t, logger, scala2123) should exist)
|
||||
}
|
||||
|
||||
it should "compile the bridge for Scala 2.13.0-M2" in {
|
||||
IO.withTemporaryDirectory(t => getCompilerBridge(t, logger, scala2130M2) should exist)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue