Skip to content

Commit 13a9f4b

Browse files
authored
Merge pull request #7120 from dotty-staging/sbt-dotty-0.3.4
Release sbt-dotty 0.3.4, future-proof isDotty
2 parents b7d691f + a06c5e4 commit 13a9f4b

File tree

4 files changed

+8
-15
lines changed

4 files changed

+8
-15
lines changed

project/Build.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,14 @@ object Build {
6161
val referenceVersion = "0.18.1-bin-20190825-6960f8d-NIGHTLY"
6262

6363
val baseVersion = "0.18.1"
64-
val baseSbtDottyVersion = "0.3.4"
64+
val baseSbtDottyVersion = "0.3.5"
6565

6666
// Versions used by the vscode extension to create a new project
6767
// This should be the latest published releases.
6868
// TODO: Have the vscode extension fetch these numbers from the Internet
6969
// instead of hardcoding them ?
7070
val publishedDottyVersion = referenceVersion
71-
val publishedSbtDottyVersion = "0.3.3"
71+
val publishedSbtDottyVersion = "0.3.4"
7272

7373
/** scala-library version required to compile Dotty.
7474
*

sbt-dotty/src/dotty/tools/sbtplugin/DottyPlugin.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ object DottyPlugin extends AutoPlugin {
168168
val Def = sbt.Def
169169
override def projectSettings: Seq[Setting[_]] = {
170170
Seq(
171-
isDotty := scalaVersion.value.startsWith("0."),
171+
isDotty := scalaVersion.value.startsWith("0.") || scalaVersion.value.startsWith("3."),
172172

173173
scalaOrganization := {
174174
if (isDotty.value)

tests/run/t6827.check

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
start at -5: java.lang.ArrayIndexOutOfBoundsException: -5
2-
start at -1: java.lang.ArrayIndexOutOfBoundsException: -1
1+
start at -5: OOB
2+
start at -1: OOB
33
start at limit: ok
44
start at limit-1: ok
55
first 10: ok

tests/run/t6827.scala

+3-10
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,9 @@ object Test extends App {
99
"ok"
1010
} catch {
1111
case e: ArrayIndexOutOfBoundsException =>
12-
// Special-case printing this exception because the toString changed in Java 11
13-
val java11toString = """java.lang.ArrayIndexOutOfBoundsException: Index (-?\d+).*""".r
14-
15-
e.toString match {
16-
case java11toString(index) =>
17-
s"java.lang.ArrayIndexOutOfBoundsException: $index"
18-
case str =>
19-
str
20-
}
21-
case e: Exception => e.toString
12+
"OOB"
13+
case e: Exception =>
14+
e.toString
2215
}
2316
println("%s: %s" format (label, status))
2417
}

0 commit comments

Comments
 (0)