From 47415e7deff4a5a1719bfff9d7b43bc6ba50ffaa Mon Sep 17 00:00:00 2001 From: jvican Date: Fri, 19 May 2017 20:32:03 +0200 Subject: [PATCH] Compile bridge for 2.12.x and other Scala versions This commit makes sure that we always check that we compile against the latest two versions in Scala 2.10, Scala 2.11 and Scala 2.12. This commit also removes the null loggers and uses normal loggers to check what the output of the bridge provider is. This output is important and the rationale to do this is that it should be visible for us in order to detect cases where there's a regression or the output is modified in some way. Output is short anyway. --- .../inc/ZincComponentCompilerSpec.scala | 30 +++++++++++-------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/internal/zinc-ivy-integration/src/test/scala/sbt/internal/inc/ZincComponentCompilerSpec.scala b/internal/zinc-ivy-integration/src/test/scala/sbt/internal/inc/ZincComponentCompilerSpec.scala index ad403ffdc..cbba8021b 100644 --- a/internal/zinc-ivy-integration/src/test/scala/sbt/internal/inc/ZincComponentCompilerSpec.scala +++ b/internal/zinc-ivy-integration/src/test/scala/sbt/internal/inc/ZincComponentCompilerSpec.scala @@ -1,23 +1,29 @@ package sbt.internal.inc +import sbt.internal.util.ConsoleLogger import sbt.io.IO -import sbt.util.Logger class ZincComponentCompilerSpec extends BridgeProviderSpecification { + val scala2105 = "2.10.5" + val scala2106 = "2.10.6" + val scala2118 = "2.11.8" + val scala21111 = "2.11.11" + val scala2121 = "2.12.1" + val scala2122 = "2.12.2" - val scala210 = "2.10.5" - val scala211 = "2.11.8" - - it should "compile the bridge for Scala 2.10" in { - IO.withTemporaryDirectory { tempDir => - getCompilerBridge(tempDir, Logger.Null, scala210) should exist - } + val logger = ConsoleLogger() + it should "compile the bridge for Scala 2.10.5 and 2.10.6" in { + IO.withTemporaryDirectory(t => getCompilerBridge(t, logger, scala2105) should exist) + IO.withTemporaryDirectory(t => getCompilerBridge(t, logger, scala2106) should exist) } - it should "compile the bridge for Scala 2.11" in { - IO.withTemporaryDirectory { tempDir => - getCompilerBridge(tempDir, Logger.Null, scala211) should exist - } + it should "compile the bridge for Scala 2.11.8 and 2.11.11" in { + IO.withTemporaryDirectory(t => getCompilerBridge(t, logger, scala2118) should exist) + IO.withTemporaryDirectory(t => getCompilerBridge(t, logger, scala21111) should exist) } + it should "compile the bridge for Scala 2.12.2" in { + IO.withTemporaryDirectory(t => getCompilerBridge(t, logger, scala2121) should exist) + IO.withTemporaryDirectory(t => getCompilerBridge(t, logger, scala2122) should exist) + } }