From 31a99971dbbbc3801d173fb329f9ba7ccf1d78f4 Mon Sep 17 00:00:00 2001 From: Dale Wijnand Date: Thu, 8 Sep 2016 15:31:12 +0100 Subject: [backport] Bump sbt.version to 0.13.12, without breaking --- build.sbt | 5 +++++ project/build.properties | 2 +- scripts/common | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index 3b0c74a0ee..87556bc894 100644 --- a/build.sbt +++ b/build.sbt @@ -136,6 +136,11 @@ lazy val commonSettings = clearSourceAndResourceDirectories ++ publishSettings + } }, scalaVersion := (scalaVersion in bootstrap).value, + // As of sbt 0.13.12 (sbt/sbt#2634) sbt endeavours to align both scalaOrganization and scalaVersion + // in the Scala artefacts, for example scala-library and scala-compiler. + // This doesn't work in the scala/scala build because the version of scala-library and the scalaVersion of + // scala-library are correct to be different. So disable overriding. + ivyScala ~= (_ map (_ copy (overrideScalaVersion = false))), // we always assume that Java classes are standalone and do not have any dependency // on Scala classes compileOrder := CompileOrder.JavaThenScala, diff --git a/project/build.properties b/project/build.properties index 43b8278c68..35c88bab7d 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=0.13.11 +sbt.version=0.13.12 diff --git a/scripts/common b/scripts/common index bfddf3d149..f2202b9165 100644 --- a/scripts/common +++ b/scripts/common @@ -19,7 +19,7 @@ mkdir -p $IVY_CACHE rm -rf $IVY_CACHE/cache/org.scala-lang SBT_CMD=${sbtCmd-sbt} -SBT_CMD="$SBT_CMD -sbt-version 0.13.11" +SBT_CMD="$SBT_CMD -sbt-version 0.13.12" # temp dir where all 'non-build' operation are performed TMP_ROOT_DIR=$(mktemp -d -t pr-scala.XXXX) -- cgit v1.2.3 From 9201f53ba46159cbd3a342a51106e671d0063feb Mon Sep 17 00:00:00 2001 From: Som Snytt Date: Wed, 19 Oct 2016 12:26:59 -0700 Subject: SI-9832 Fix line endings in junit test --- .../scala/tools/nsc/settings/SettingsTest.scala | 40 ++++++++++++---------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/test/junit/scala/tools/nsc/settings/SettingsTest.scala b/test/junit/scala/tools/nsc/settings/SettingsTest.scala index 3fdf758619..183cb792cc 100644 --- a/test/junit/scala/tools/nsc/settings/SettingsTest.scala +++ b/test/junit/scala/tools/nsc/settings/SettingsTest.scala @@ -181,6 +181,12 @@ class SettingsTest { assertThrows[IllegalArgumentException](check(expected = "2.11", "-Xsource:2.invalid"), _ contains "There was a problem parsing 2.invalid") } + // equal with stripped margins and normalized line endings + private def marginallyEquals(s1: String, s2: String): Boolean = { + def normally(s: String): String = s.stripMargin.lines.mkString("\n") + normally(s1) == normally(s2) + } + @Test def helpHasDefault(): Unit = { val s = new MutableSettings(msg => throw new IllegalArgumentException(msg)) object mChoices extends s.MultiChoiceEnumeration { @@ -201,15 +207,14 @@ class SettingsTest { assertTrue(check("-m")(_.value == Set(b))) assertTrue(check("-m") { _ => - assertEquals( - """magic sauce - | a help a - | b help b - | c help c - |Default: b - |""".stripMargin, - m.help) - true + val expected = + """|magic sauce + | a help a + | b help b + | c help c + |Default: b + |""" + marginallyEquals(expected, m.help) }) } @Test def helpHasDefaultAll(): Unit = { @@ -232,15 +237,14 @@ class SettingsTest { assertTrue(check("-m")(_.value == Set(a, b, c))) assertTrue(check("-m") { _ => - assertEquals( - """magic sauce - | a help a - | b help b - | c help c - |Default: All choices are enabled by default. - |""".stripMargin, - m.help) - true + val expected = + """|magic sauce + | a help a + | b help b + | c help c + |Default: All choices are enabled by default. + |""" + marginallyEquals(expected, m.help) }) } } -- cgit v1.2.3