Skip to content

Commit

Permalink
Merge pull request #2955 from tgodzik/next-rc
Browse files Browse the repository at this point in the history
Add support for Scala 3.0.2-RC1 and drop references to 3.0.0-RC
  • Loading branch information
tgodzik authored Jul 13, 2021
2 parents 1f57ddb + 24c1cb5 commit 56fbd61
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 57 deletions.
4 changes: 1 addition & 3 deletions bin/test-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ argumentsRest=${@:2}
suffix=${argumentsRest:-}

coursier fetch \
org.scalameta:mtags_3.0.0-RC1:$version \
org.scalameta:mtags_3.0.0-RC2:$version \
org.scalameta:mtags_3.0.0-RC3:$version \
org.scalameta:mtags_3.0.0:$version \
org.scalameta:mtags_3.0.1:$version \
org.scalameta:metals_2.12:$version \
org.scalameta:mtags_2.13.0:$version \
org.scalameta:mtags_2.13.1:$version \
Expand Down
15 changes: 3 additions & 12 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ lazy val V = new {
val bsp = "2.0.0-M13"
val bloop = "1.4.8-19-4d9f966b"
val scala3 = "3.0.1"
val nextScala3RC = "3.0.2-RC1"
val bloopNightly = bloop
val sbtBloop = bloop
val gradleBloop = bloop
Expand Down Expand Up @@ -242,11 +243,7 @@ lazy val V = new {
def scala2Versions = nonDeprecatedScala2Versions ++ deprecatedScala2Versions

// Scala 3
def nonDeprecatedScala3Versions =
Seq(
scala3,
"3.0.0"
)
def nonDeprecatedScala3Versions = Seq(nextScala3RC, scala3, "3.0.0")
def deprecatedScala3Versions = Seq()
def scala3Versions = nonDeprecatedScala3Versions ++ deprecatedScala3Versions

Expand Down Expand Up @@ -612,13 +609,7 @@ lazy val mtest = project
testSettings,
sharedSettings,
libraryDependencies ++= List(
if (
scalaVersion.value == "3.0.0-RC1" || scalaVersion.value == "3.0.0-RC2"
) {
"org.scalameta" %% "munit" % "0.7.23"
} else {
"org.scalameta" %% "munit" % V.munit
},
"org.scalameta" %% "munit" % V.munit,
"io.get-coursier" % "interface" % V.coursierInterfaces
),
buildInfoPackage := "tests",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class CancelCompletionSuite extends BaseCompletionSuite {
name: TestOptions,
query: String,
expected: String,
compat: Map[String, String]
compat: Map[String, String] = Map.empty
)(implicit loc: Location): Unit = {
test(name) {
val (code, offset) = params(query)
Expand Down Expand Up @@ -90,10 +90,7 @@ class CancelCompletionSuite extends BaseCompletionSuite {
""".stripMargin,
"""|assert(assertion: Boolean): Unit
|assert(assertion: Boolean, message: => Any): Unit
|""".stripMargin,
compat = Map(
"3.0.0-RC1" -> "assert(assertion: Boolean): Unit"
)
|""".stripMargin
)

}
6 changes: 0 additions & 6 deletions tests/cross/src/test/scala/tests/pc/CompletionArgSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,6 @@ class CompletionArgSuite extends BaseCompletionSuite {
|""".stripMargin,
topLines = Some(5),
compat = Map(
"3.0.0-RC1" ->
"""|argument = : Int
|""".stripMargin,
"3.0" ->
"""|argument = : Int
|Calendar - java.util
Expand All @@ -316,9 +313,6 @@ class CompletionArgSuite extends BaseCompletionSuite {
|""".stripMargin,
topLines = Some(5),
compat = Map(
"3.0.0-RC1" ->
"""|`type` = : Int
|""".stripMargin,
"3.0" ->
"""|`type` = : Int
|""".stripMargin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ class CompletionSnippetNegSuite extends BaseCompletionSuite {
|println
|""".stripMargin,
compat = Map(
"3.0.0-RC1" -> "println",
"3.0" ->
"""|println
|println
Expand Down
45 changes: 15 additions & 30 deletions tests/cross/src/test/scala/tests/pc/CompletionSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class CompletionSuite extends BaseCompletionSuite {
check(
// before 3.0.1 completions with the same name were included in one completion in a random order
"dot".tag(
IgnoreScalaVersion(Set("3.0.0-RC1", "3.0.0-RC2", "3.0.0-RC3", "3.0.0"))
IgnoreScalaVersion(Set("3.0.0"))
),
"""
|object A {
Expand Down Expand Up @@ -697,16 +697,13 @@ class CompletionSuite extends BaseCompletionSuite {
|readAttributes[A <: BasicFileAttributes](path: Path, type: Class[A], options: LinkOption*): A
|""".stripMargin,
compat = Map(
"3.0.0-RC1" ->
"3.0.0" ->
"""|readAttributes(x$0: Path, x$1: String, x$2: LinkOption*): java.util.Map[String, Object]
|readAttributes[A <: BasicFileAttributes](x$0: Path, x$1: Class[A], x$2: LinkOption*): A
|""".stripMargin,
"3.0.1" ->
"3.0" ->
"""|readAttributes[A <: BasicFileAttributes](x$0: Path, x$1: Class[A], x$2: LinkOption*): A
|readAttributes(x$0: Path, x$1: String, x$2: LinkOption*): java.util.Map[String, Object]
|""".stripMargin,
"3.0" ->
"""|readAttributes(x$0: Path, x$1: String, x$2: LinkOption*): java.util.Map[String, Object]
|readAttributes[A <: BasicFileAttributes](x$0: Path, x$1: Class[A], x$2: LinkOption*): A
|""".stripMargin
)
)
Expand Down Expand Up @@ -815,7 +812,6 @@ class CompletionSuite extends BaseCompletionSuite {
|until(end: Long): NumericRange.Exclusive[Long]
|until(end: Long, step: Long): NumericRange.Exclusive[Long]
|""".stripMargin,
"3.0.0-RC1" -> "until(end: Int, step: Int): Range",
"3.0" ->
"""|until(end: Int): Range
|until(end: Int, step: Int): Range
Expand Down Expand Up @@ -1021,11 +1017,6 @@ class CompletionSuite extends BaseCompletionSuite {
|Seq scala.collection.immutable
|Set scala.collection.immutable
|""".stripMargin,
"3.0.0-RC1" ->
"""|Seq scala.collection.immutable
|Set scala.collection.immutable
|StringBuilder scala.collection.mutable
|""".stripMargin,
"3.0" ->
"""|Seq scala.collection.immutable
|Set scala.collection.immutable
Expand All @@ -1052,15 +1043,15 @@ class CompletionSuite extends BaseCompletionSuite {
|Seq scala.collection.immutable
|Set scala.collection.immutable
|""".stripMargin,
"3.0.1" ->
"""|Seq scala.collection.immutable
|Set scala.collection.immutable
|Stream scala.collection.immutable
|""".stripMargin,
"3.0" ->
"3.0.0" ->
"""|SafeVarargs java.lang
|SafeVarargs java.lang
|ScalaReflectionException scala
|""".stripMargin,
"3.0" ->
"""|Seq scala.collection.immutable
|Set scala.collection.immutable
|Stream scala.collection.immutable
|""".stripMargin
)
)
Expand All @@ -1085,11 +1076,6 @@ class CompletionSuite extends BaseCompletionSuite {
|""".stripMargin,
topLines = Option(3),
compat = Map(
"3.0.0-RC1" ->
"""|NotString: Int
|Number: Regex
|Nil scala.collection.immutable
|""".stripMargin,
"3.0" ->
"""|NotString: Int
|Nil scala.collection.immutable
Expand Down Expand Up @@ -1163,14 +1149,13 @@ class CompletionSuite extends BaseCompletionSuite {
|""".stripMargin,
filterText = "substring",
compat = Map(
"3.0.0-RC1" -> "substring(x$0: Int, x$1: Int): String",
"3.0.1" ->
"""|substring(x$0: Int): String
|substring(x$0: Int, x$1: Int): String
|""".stripMargin,
"3.0" ->
"3.0.0" ->
"""|substring(x$0: Int, x$1: Int): String
|substring(x$0: Int): String
|""".stripMargin,
"3.0" ->
"""|substring(x$0: Int): String
|substring(x$0: Int, x$1: Int): String
|""".stripMargin
)
)
Expand Down

0 comments on commit 56fbd61

Please sign in to comment.