Skip to content

Commit

Permalink
Scala 3.0.0 final 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
gabro committed May 13, 2021
1 parent 84980e9 commit 0a694f9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 24 deletions.
6 changes: 2 additions & 4 deletions bin/test-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +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_3.0.0-RC2:$version \
org.scalameta:munit_3.0.0-RC3:$version \
org.scalameta:munit_3.0:$version \
org.scalameta:munit_native0.4_2.11:$version \
org.scalameta:munit_native0.4_2.12:$version \
org.scalameta:munit_native0.4_2.13:$version \
Expand All @@ -20,8 +19,7 @@ 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_3.0.0-RC2:$version \
org.scalameta:munit-scalacheck_3.0.0-RC3:$version \
org.scalameta:munit-scalacheck_3.0:$version \
org.scalameta:munit-scalacheck_native0.4_2.11:$version \
org.scalameta:munit-scalacheck_native0.4_2.12:$version \
org.scalameta:munit-scalacheck_native0.4_2.13:$version \
Expand Down
18 changes: 5 additions & 13 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ def previousVersion = "0.7.0"
def scala213 = "2.13.4"
def scala212 = "2.12.13"
def scala211 = "2.11.12"
def scala3Stable = "3.0.0-RC3"
def scala3Previous = List("3.0.0-RC2")
def scala3 = "3.0.0"
def junitVersion = "4.13.2"
def gcp = "com.google.cloud" % "google-cloud-storage" % "1.113.16"
inThisBuild(
Expand Down Expand Up @@ -54,15 +53,14 @@ addCommandAlias(
)
val isPreScala213 = Set[Option[(Long, Long)]](Some((2, 11)), Some((2, 12)))
val scala2Versions = List(scala213, scala212, scala211)
val scala3Versions = scala3Stable :: scala3Previous
val allScalaVersions = scala2Versions ++ scala3Versions
val allScalaVersions = scala2Versions :+ scala3
def isNotScala211(v: Option[(Long, Long)]): Boolean = !v.contains((2, 11))
def isScala2(v: Option[(Long, Long)]): Boolean = v.exists(_._1 == 2)
val isScala3Setting = Def.setting {
isScala3(CrossVersion.partialVersion(scalaVersion.value))
}

def isScala3(v: Option[(Long, Long)]): Boolean = v.exists(_._1 != 2)
def isScala3(v: Option[(Long, Long)]): Boolean = v.exists(_._1 == 3)

// NOTE(olafur): disable Scala.js and Native settings for IntelliJ.
lazy val skipIdeaSettings =
Expand Down Expand Up @@ -101,7 +99,7 @@ val sharedJVMSettings: List[Def.Setting[_]] = List(
) ++ mimaEnable
val sharedJSSettings: List[Def.Setting[_]] = List(
skipIdeaSettings,
crossScalaVersions := allScalaVersions.filterNot(_.startsWith("0.")),
crossScalaVersions := allScalaVersions,
scalaJSLinkerConfig ~= (_.withModuleKind(ModuleKind.CommonJSModule))
)
val sharedJSConfigure: Project => Project =
Expand Down Expand Up @@ -174,9 +172,6 @@ lazy val munit = crossProject(JSPlatform, JVMPlatform, NativePlatform)
if (isScala2(partialVersion)) {
result += base / "scala-2"
}
if (isScala3(partialVersion)) {
result += base / "scala-3"
}
result.toList
},
libraryDependencies ++= List(
Expand Down Expand Up @@ -305,10 +300,7 @@ lazy val docs = project
(ThisBuild / baseDirectory).value / "website" / "target" / "docs",
mdocExtraArguments := List("--no-link-hygiene"),
mdocVariables := Map(
"VERSION" -> version.value.replaceFirst("\\+.*", ""),
"SCALA3_PREVIOUS_VERSION" -> scala3Stable,
"SCALA3_STABLE_VERSION" -> scala3Previous.head,
"SUPPORTED_SCALA_VERSIONS" -> allScalaVersions.mkString(", ")
"VERSION" -> version.value.replaceFirst("\\+.*", "")
),
fork := false
)
Expand Down
13 changes: 6 additions & 7 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,12 @@ object test extends Tests {
}
```

| Scala Version | JVM | Scala.js (0.6.x) | Scala.js (1.x) | Native (0.4.x) |
| ------------------------- | :-: | :--------------: | :------------: | :------------: |
| 2.11.x || ✅ until 0.7.16 |||
| 2.12.x || ✅ until 0.7.16 |||
| 2.13.x || ✅ until 0.7.16 |||
| @SCALA3_PREVIOUS_VERSION@ || n/a || n/a |
| @SCALA3_STABLE_VERSION@ || n/a || n/a |
| Scala Version | JVM | Scala.js (0.6.x) | Scala.js (1.x) | Native (0.4.x) |
| ------------- | :-: | :--------------: | :------------: | :------------: |
| 2.11.x || ✅ until 0.7.16 |||
| 2.12.x || ✅ until 0.7.16 |||
| 2.13.x || ✅ until 0.7.16 |||
| 3.0.x || n/a || n/a |

Next, write a test suite.

Expand Down

0 comments on commit 0a694f9

Please sign in to comment.