Skip to content

Commit

Permalink
Merge pull request #241 from tgodzik/update-dotty
Browse files Browse the repository at this point in the history
Update Scala 3 version to 3.0.0-M1
  • Loading branch information
tgodzik authored Nov 4, 2020
2 parents d0c18b6 + 02bb6c0 commit a81bc6d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 19 deletions.
4 changes: 2 additions & 2 deletions bin/test-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ coursier resolve \
org.scalameta:munit_2.11:$version \
org.scalameta:munit_2.12:$version \
org.scalameta:munit_2.13:$version \
org.scalameta:munit_0.26:$version \
org.scalameta:munit_3.0:$version \
org.scalameta:munit_0.27:$version \
org.scalameta:munit_native0.4.0-M2_2.11:$version \
org.scalameta:munit_sjs0.6_2.11:$version \
Expand All @@ -21,8 +21,8 @@ coursier resolve \
org.scalameta:munit-scalacheck_2.11:$version \
org.scalameta:munit-scalacheck_2.12:$version \
org.scalameta:munit-scalacheck_2.13:$version \
org.scalameta:munit-scalacheck_0.26:$version \
org.scalameta:munit-scalacheck_0.27:$version \
org.scalameta:munit-scalacheck_3.0:$version \
org.scalameta:munit-scalacheck_native0.4.0-M2_2.11:$version \
org.scalameta:munit-scalacheck_sjs0.6_2.11:$version \
org.scalameta:munit-scalacheck_sjs0.6_2.12:$version \
Expand Down
17 changes: 8 additions & 9 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ def previousVersion = "0.7.0"
def scala213 = "2.13.2"
def scala212 = "2.12.11"
def scala211 = "2.11.12"
def dottyNext = "0.27.0-RC1"
def dottyStable = "0.26.0"
def scala3Stable = "3.0.0-M1"
def scala3Previous = "0.27.0-RC1"
def junitVersion = "4.13"
def gcp = "com.google.cloud" % "google-cloud-storage" % "1.113.2"
inThisBuild(
Expand Down Expand Up @@ -62,11 +62,11 @@ addCommandAlias(
)
val isPreScala213 = Set[Option[(Long, Long)]](Some((2, 11)), Some((2, 12)))
val scala2Versions = List(scala213, scala212, scala211)
val scala3Versions = List(dottyNext, dottyStable)
val scala3Versions = List(scala3Previous, scala3Stable)
val allScalaVersions = scala2Versions ++ scala3Versions
def isNotScala211(v: Option[(Long, Long)]): Boolean = !v.contains((2, 11))
def isScala2(v: Option[(Long, Long)]): Boolean = v.exists(_._1 == 2)
def isScala3(v: Option[(Long, Long)]): Boolean = v.exists(_._1 == 0)
def isScala3(v: Option[(Long, Long)]): Boolean = v.exists(_._1 != 2)
val isScalaJS = Def.setting[Boolean](
SettingKey[Boolean]("scalaJSUseMainModuleInitializer").?.value.isDefined
)
Expand Down Expand Up @@ -132,7 +132,7 @@ val sharedSettings = List(
"-Xexperimental",
"-Ywarn-unused-import"
)
case Some((0, _)) => List()
case Some((major, _)) if major != 2 => List()
case _ =>
List(
"-target:jvm-1.8",
Expand Down Expand Up @@ -191,7 +191,7 @@ lazy val munit = crossProject(JSPlatform, JVMPlatform, NativePlatform)
},
libraryDependencies ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((0, _)) => Nil
case Some((major, _)) if major != 2 => Nil
case _ =>
List(
"org.scala-lang" % "scala-reflect" % scalaVersion.value
Expand Down Expand Up @@ -321,9 +321,8 @@ lazy val docs = project
mdocExtraArguments := List("--no-link-hygiene"),
mdocVariables := Map(
"VERSION" -> version.value.replaceFirst("\\+.*", ""),
"DOTTY_VERSION" -> dottyNext,
"DOTTY_NEXT_VERSION" -> dottyNext,
"DOTTY_STABLE_VERSION" -> dottyStable,
"SCALA3_PREVIOUS_VERSION" -> scala3Stable,
"SCALA3_STABLE_VERSION" -> scala3Stable,
"SUPPORTED_SCALA_VERSIONS" -> allScalaVersions.mkString(", ")
),
fork := false
Expand Down
14 changes: 7 additions & 7 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ libraryDependencies += "org.scalameta" %% "munit" % "@VERSION@" % Test
testFrameworks += new TestFramework("munit.Framework")
```

| Scala Version | JVM | Scala.js (0.6.x, 1.x) | Native (0.4.x) |
| ---------------------- | :-: | :-------------------: | :------------: |
| 2.11.x ||||
| 2.12.x ||| n/a |
| 2.13.x ||| n/a |
| @DOTTY_NEXT_VERSION@ || n/a | n/a |
| @DOTTY_STABLE_VERSION@ || n/a | n/a |
| Scala Version | JVM | Scala.js (0.6.x, 1.x) | Native (0.4.x) |
| ------------------------- | :-: | :-------------------: | :------------: |
| 2.11.x ||||
| 2.12.x ||| n/a |
| 2.13.x ||| n/a |
| @SCALA3_PREVIOUS_VERSION@ || n/a | n/a |
| @SCALA3_STABLE_VERSION@ || n/a | n/a |

Next, write a test suite.

Expand Down
2 changes: 1 addition & 1 deletion tests/shared/src/test/scala/munit/BaseSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class BaseSuite extends FunSuite {
"BaseSuite",
{ test =>
def isDotty: Boolean =
BuildInfo.scalaVersion.startsWith("0.")
!BuildInfo.scalaVersion.startsWith("2.")
def is213: Boolean =
BuildInfo.scalaVersion.startsWith("2.13") || isDotty
if (test.tags(NoDotty) && isDotty) {
Expand Down

0 comments on commit a81bc6d

Please sign in to comment.