Skip to content

Commit

Permalink
Split compiler bridge tests to another subproject
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
eed3si9n committed Nov 21, 2017
1 parent 1c1ba43 commit 282b0f7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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)
}
}

0 comments on commit 282b0f7

Please sign in to comment.