From ba8702734baf1c144b31c93fe113bee09f6e4a6f Mon Sep 17 00:00:00 2001 From: Guillaume Martres Date: Wed, 28 Aug 2019 13:29:12 +0200 Subject: [PATCH 1/3] Future-proof isDotty setting for when we switch to 3.x versioning --- sbt-dotty/src/dotty/tools/sbtplugin/DottyPlugin.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbt-dotty/src/dotty/tools/sbtplugin/DottyPlugin.scala b/sbt-dotty/src/dotty/tools/sbtplugin/DottyPlugin.scala index 14cc2b523a82..19a1455ef1ed 100644 --- a/sbt-dotty/src/dotty/tools/sbtplugin/DottyPlugin.scala +++ b/sbt-dotty/src/dotty/tools/sbtplugin/DottyPlugin.scala @@ -168,7 +168,7 @@ object DottyPlugin extends AutoPlugin { val Def = sbt.Def override def projectSettings: Seq[Setting[_]] = { Seq( - isDotty := scalaVersion.value.startsWith("0."), + isDotty := scalaVersion.value.startsWith("0.") || scalaVersion.value.startsWith("3."), scalaOrganization := { if (isDotty.value) From bcbbbc058fa61d4d3fe210b03e0e51cd18ab7276 Mon Sep 17 00:00:00 2001 From: Guillaume Martres Date: Wed, 28 Aug 2019 15:11:27 +0200 Subject: [PATCH 2/3] Make test t6827 less flaky It failed once on the CI on OpenJDK 8 because the toString of the exception was "java.lang.ArrayIndexOutOfBoundsException" instead of "java.lang.ArrayIndexOutOfBoundsException:-1" (https://dotty-ci.epfl.ch/lampepfl/dotty/982/1/4). I have no idea how this could happen (different code paths between the interpreted and JIT compiled code ?), so just stop checking for the exact toString output. --- tests/run/t6827.check | 4 ++-- tests/run/t6827.scala | 13 +++---------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/tests/run/t6827.check b/tests/run/t6827.check index 4889e05be868..592717ecb787 100644 --- a/tests/run/t6827.check +++ b/tests/run/t6827.check @@ -1,5 +1,5 @@ -start at -5: java.lang.ArrayIndexOutOfBoundsException: -5 -start at -1: java.lang.ArrayIndexOutOfBoundsException: -1 +start at -5: OOB +start at -1: OOB start at limit: ok start at limit-1: ok first 10: ok diff --git a/tests/run/t6827.scala b/tests/run/t6827.scala index cb35719408f9..0f8857b960ee 100644 --- a/tests/run/t6827.scala +++ b/tests/run/t6827.scala @@ -9,16 +9,9 @@ object Test extends App { "ok" } catch { case e: ArrayIndexOutOfBoundsException => - // Special-case printing this exception because the toString changed in Java 11 - val java11toString = """java.lang.ArrayIndexOutOfBoundsException: Index (-?\d+).*""".r - - e.toString match { - case java11toString(index) => - s"java.lang.ArrayIndexOutOfBoundsException: $index" - case str => - str - } - case e: Exception => e.toString + "OOB" + case e: Exception => + e.toString } println("%s: %s" format (label, status)) } From a06c5e4786033470c3059e68d9d53ed8441f3ba3 Mon Sep 17 00:00:00 2001 From: Guillaume Martres Date: Wed, 28 Aug 2019 13:56:27 +0200 Subject: [PATCH 3/3] sbt-dotty: Bump to 0.3.5-SNAPSHOT --- project/Build.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/project/Build.scala b/project/Build.scala index cc6436a1106d..47f4b4130881 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -61,14 +61,14 @@ object Build { val referenceVersion = "0.18.1-bin-20190825-6960f8d-NIGHTLY" val baseVersion = "0.18.1" - val baseSbtDottyVersion = "0.3.4" + val baseSbtDottyVersion = "0.3.5" // Versions used by the vscode extension to create a new project // This should be the latest published releases. // TODO: Have the vscode extension fetch these numbers from the Internet // instead of hardcoding them ? val publishedDottyVersion = referenceVersion - val publishedSbtDottyVersion = "0.3.3" + val publishedSbtDottyVersion = "0.3.4" /** scala-library version required to compile Dotty. *