Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release sbt-dotty 0.3.4, future-proof isDotty #7120

Merged
merged 3 commits into from
Aug 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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