From c859db12f838b96cc56c5e2c703d1819ae8f9e9e Mon Sep 17 00:00:00 2001 From: Tomasz Godzik Date: Mon, 16 Oct 2023 09:58:15 +0200 Subject: [PATCH] chore: Bump Scala version to LTS version --- .github/workflows/ci.yml | 2 +- .mergify.yml | 6 +++--- build.sbt | 4 +--- mdoc-sbt/src/sbt-test/sbt-mdoc/basic/build.sbt | 2 +- mdoc-sbt/src/sbt-test/sbt-mdoc/basic/test | 4 ++-- mdoc-sbt/src/sbt-test/sbt-mdoc/scalajs-1.7/test | 4 ++-- .../test/scala/tests/markdown/CrashSuite.scala | 1 - .../tests/markdown/NamespaceHygieneSuite.scala | 4 ++-- .../src/test/scala/tests/markdown/NestSuite.scala | 6 +++--- .../scala/tests/worksheets/WorksheetSuite.scala | 15 +++++++-------- 10 files changed, 22 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0c8a23f62..27a92f28b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,7 +57,7 @@ jobs: - "'++2.12.18 test'" - "'++2.13.12 test'" # Minimal supported version - - "'++3.1.3 test'" + - "'++3.3.1 test'" - "scripted" steps: - uses: actions/checkout@v4 diff --git a/.mergify.yml b/.mergify.yml index 90c1ee669..5eb1a0ec4 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -8,17 +8,17 @@ pull_request_rules: - check-success="'++2.12.12! test' adopt@1.8" - check-success="'++2.12.18 test' adopt@1.8" - check-success="'++2.13.12 test' adopt@1.8" - - check-success="'++3.1.3 test' adopt@1.8" + - check-success="'++3.3.0 test' adopt@1.8" - check-success="scripted adopt@1.8" - check-success="'++2.12.12! test' adopt@1.11" - check-success="'++2.12.18 test' adopt@1.11" - check-success="'++2.13.12 test' adopt@1.11" - - check-success="'++3.1.3 test' adopt@1.11" + - check-success="'++3.3.0 test' adopt@1.11" - check-success="scripted adopt@1.11" - check-success="'++2.12.12! test' 17" - check-success="'++2.12.18 test' 17" - check-success="'++2.13.12 test' 17" - - check-success="'++3.1.3 test' 17" + - check-success="'++3.3.0 test' 17" - check-success=scripted 17 actions: merge: diff --git a/build.sbt b/build.sbt index 79a4668f8..104c5844f 100644 --- a/build.sbt +++ b/build.sbt @@ -2,9 +2,7 @@ import scala.collection.mutable def scala212 = "2.12.18" def scala213 = "2.13.12" -/* This should be kept at 3.1.3 until there is a - * need for change and in that case we should bump to LTS*/ -def scala3 = "3.1.3" +def scala3 = "3.3.1" def scala2Versions = List(scala212, scala213) def allScalaVersions = scala2Versions :+ scala3 diff --git a/mdoc-sbt/src/sbt-test/sbt-mdoc/basic/build.sbt b/mdoc-sbt/src/sbt-test/sbt-mdoc/basic/build.sbt index 53912e1c3..0e52d375f 100644 --- a/mdoc-sbt/src/sbt-test/sbt-mdoc/basic/build.sbt +++ b/mdoc-sbt/src/sbt-test/sbt-mdoc/basic/build.sbt @@ -1,5 +1,5 @@ ThisBuild / scalaVersion := "2.12.18" -ThisBuild / crossScalaVersions := List("2.12.18", "2.13.12", "3.1.3", "3.3.0") +ThisBuild / crossScalaVersions := List("2.12.18", "2.13.12", "3.3.0", "3.3.1") enablePlugins(MdocPlugin) mdocJS := Some(jsapp) diff --git a/mdoc-sbt/src/sbt-test/sbt-mdoc/basic/test b/mdoc-sbt/src/sbt-test/sbt-mdoc/basic/test index d467de50b..ebf1ef203 100644 --- a/mdoc-sbt/src/sbt-test/sbt-mdoc/basic/test +++ b/mdoc-sbt/src/sbt-test/sbt-mdoc/basic/test @@ -2,9 +2,9 @@ > check > ++2.13.12 mdoc > check -> ++3.1.3 mdoc -> check > ++3.3.0 mdoc > check +> ++3.3.1 mdoc +> check > set mdocIn := (ThisBuild / baseDirectory).value -> mdoc diff --git a/mdoc-sbt/src/sbt-test/sbt-mdoc/scalajs-1.7/test b/mdoc-sbt/src/sbt-test/sbt-mdoc/scalajs-1.7/test index d467de50b..ebf1ef203 100644 --- a/mdoc-sbt/src/sbt-test/sbt-mdoc/scalajs-1.7/test +++ b/mdoc-sbt/src/sbt-test/sbt-mdoc/scalajs-1.7/test @@ -2,9 +2,9 @@ > check > ++2.13.12 mdoc > check -> ++3.1.3 mdoc -> check > ++3.3.0 mdoc > check +> ++3.3.1 mdoc +> check > set mdocIn := (ThisBuild / baseDirectory).value -> mdoc diff --git a/tests/unit/src/test/scala/tests/markdown/CrashSuite.scala b/tests/unit/src/test/scala/tests/markdown/CrashSuite.scala index e9aea3ef9..22a8d984b 100644 --- a/tests/unit/src/test/scala/tests/markdown/CrashSuite.scala +++ b/tests/unit/src/test/scala/tests/markdown/CrashSuite.scala @@ -265,7 +265,6 @@ class CrashSuite extends BaseMarkdownSuite { |// java.lang.ArithmeticException: / by zero |// at repl.MdocSession$MdocApp.hello$1(significant-indentation.md:19) |// at repl.MdocSession$MdocApp.$init$$$anonfun$1(significant-indentation.md:20) - |// at repl.MdocSession$MdocApp.$init$$$anonfun$adapted$1(significant-indentation.md:21) |``` |""".stripMargin ) diff --git a/tests/unit/src/test/scala/tests/markdown/NamespaceHygieneSuite.scala b/tests/unit/src/test/scala/tests/markdown/NamespaceHygieneSuite.scala index aea604f37..dfdb345d0 100644 --- a/tests/unit/src/test/scala/tests/markdown/NamespaceHygieneSuite.scala +++ b/tests/unit/src/test/scala/tests/markdown/NamespaceHygieneSuite.scala @@ -31,8 +31,8 @@ class NamespaceHygieneSuite extends BaseMarkdownSuite { Compat.Scala3 -> """ |error: cannot import something called MdocSession.md:3:9: - |Reference to MdocSession is ambiguous, - |it is both defined in package repl + |Reference to MdocSession is ambiguous. + |It is both defined in package repl |and imported by name subsequently by import util.{...} |val x = MdocSession.nextInt(1) | ^^^^^^^^^^^ diff --git a/tests/unit/src/test/scala/tests/markdown/NestSuite.scala b/tests/unit/src/test/scala/tests/markdown/NestSuite.scala index 4ba691e12..9b72a8b78 100644 --- a/tests/unit/src/test/scala/tests/markdown/NestSuite.scala +++ b/tests/unit/src/test/scala/tests/markdown/NestSuite.scala @@ -249,7 +249,7 @@ class NestSuite extends BaseMarkdownSuite { """.stripMargin, """ |error: reset-scala3.md:9:15: - |no given instance of type Int was found for parameter e of method implicitly in object Predef + |No given instance of type Int was found for parameter e of method implicitly in object Predef |implicitly[Int] | ^ """.stripMargin @@ -288,11 +288,11 @@ class NestSuite extends BaseMarkdownSuite { """.stripMargin, """ |error: multi-reset-scala3.md:15:15: - |no given instance of type Int was found for parameter e of method implicitly in object Predef + |No given instance of type Int was found for parameter e of method implicitly in object Predef |implicitly[Int] | ^ |error: multi-reset-scala3.md:27:15: - |no given instance of type Int was found for parameter e of method implicitly in object Predef + |No given instance of type Int was found for parameter e of method implicitly in object Predef |implicitly[Int] | ^ """.trim.stripMargin diff --git a/tests/worksheets/src/test/scala/tests/worksheets/WorksheetSuite.scala b/tests/worksheets/src/test/scala/tests/worksheets/WorksheetSuite.scala index 47efffeee..863752395 100644 --- a/tests/worksheets/src/test/scala/tests/worksheets/WorksheetSuite.scala +++ b/tests/worksheets/src/test/scala/tests/worksheets/WorksheetSuite.scala @@ -2,20 +2,19 @@ package tests.worksheets import mdoc.interfaces.DiagnosticSeverity import mdoc.interfaces.Mdoc -import mdoc.internal.pos.PositionSyntax._ import mdoc.internal.CompatClassloader +import mdoc.internal.pos.PositionSyntax._ +import munit.Location import munit.TestOptions +import tests.BaseSuite +import tests.markdown.Compat import java.lang.StringBuilder -import java.{util => ju} import java.nio.file.Paths - +import java.{util => ju} import scala.meta.inputs.Input import scala.meta.inputs.Position -import tests.BaseSuite -import tests.markdown.Compat - class WorksheetSuite extends BaseSuite { var mdoc = ju.ServiceLoader @@ -404,7 +403,7 @@ class WorksheetSuite extends BaseSuite { |val xx = fn |""".stripMargin, """|dotty-ambiguous-implicit:8:12: error: - |ambiguous given instances: both object c1 in class MdocApp and object c2 in class MdocApp match type MdocApp.this.C of parameter c of method fn in class MdocApp + |Ambiguous given instances: both object c1 in class MdocApp and object c2 in class MdocApp match type MdocApp.this.C of parameter c of method fn in class MdocApp |val xx = fn | ^ |""".stripMargin @@ -485,7 +484,7 @@ class WorksheetSuite extends BaseSuite { expected: String, compat: Map[Compat.ScalaVersion, String] = Map.empty, modifier: Option[String] = None - ): Unit = { + )(implicit location: Location): Unit = { test(options) { val filename = options.name + ".scala" val worksheet = evaluateWorksheet(filename, original, modifier)