Skip to content

Commit

Permalink
Merge pull request #7120 from dotty-staging/sbt-dotty-0.3.4
Browse files Browse the repository at this point in the history
Release sbt-dotty 0.3.4, future-proof isDotty
  • Loading branch information
smarter authored Aug 28, 2019
2 parents b7d691f + a06c5e4 commit 13a9f4b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 15 deletions.
4 changes: 2 additions & 2 deletions project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
2 changes: 1 addition & 1 deletion sbt-dotty/src/dotty/tools/sbtplugin/DottyPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions tests/run/t6827.check
Original file line number Diff line number Diff line change
@@ -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
Expand Down
13 changes: 3 additions & 10 deletions tests/run/t6827.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
Expand Down

0 comments on commit 13a9f4b

Please sign in to comment.