diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index fa9a5e08a..7b8ccbfe9 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -22,21 +22,21 @@ jobs: command: 'terminal.__.test' - java-version: 11 - command: 'sshd[{2.12.20,2.13.14,3.4.3,3.5.0}].__.test' + command: 'sshd[{2.12.20,2.13.14,3.4.3,3.5.1}].__.test' - java-version: 11 command: 'amm.repl[2.12.{9,14,20}].__.test' - java-version: 17 command: 'amm.repl[2.13.{4,9,14}].__.test' - java-version: 21 - command: 'amm.repl[{3.4.3,3.5.0}].__.test' + command: 'amm.repl[{3.4.3,3.5.1}].__.test' - java-version: 11 command: 'amm[2.12.{9,14,20}].__.test' - java-version: 17 command: 'amm[2.13.{4,9,14}].__.test' - java-version: 21 - command: 'amm[{3.4.3,3.5.0}].__.test' + command: 'amm[{3.4.3,3.5.1}].__.test' runs-on: ubuntu-latest steps: @@ -57,7 +57,7 @@ jobs: - java-version: 17 scala-version: '2.13.{4,9,14}' - java-version: 21 - scala-version: '{3.4.3,3.5.0}' + scala-version: '{3.4.3,3.5.1}' runs-on: ubuntu-latest steps: diff --git a/amm/repl/src/test/scala/ammonite/DualTestRepl.scala b/amm/repl/src/test/scala/ammonite/DualTestRepl.scala index ac9aa0344..f9436101d 100644 --- a/amm/repl/src/test/scala/ammonite/DualTestRepl.scala +++ b/amm/repl/src/test/scala/ammonite/DualTestRepl.scala @@ -34,6 +34,9 @@ class DualTestRepl { dual => else scalaVersion.takeWhile(_ != '.') def scala2 = scalaVersion.startsWith("2.") def scala2_12 = scalaVersion.startsWith("2.12.") + def scala3_5_1OrHigher = + (scalaVersion.startsWith("3.5.") && scalaVersion.split("\\.")(2).toInt >= 1) || + scalaVersion.split("\\.")(1).toInt >= 6 def interps = repls.map(_.interp) diff --git a/amm/repl/src/test/scala/ammonite/session/BuiltinTests.scala b/amm/repl/src/test/scala/ammonite/session/BuiltinTests.scala index 400d4dd47..70e630cec 100644 --- a/amm/repl/src/test/scala/ammonite/session/BuiltinTests.scala +++ b/amm/repl/src/test/scala/ammonite/session/BuiltinTests.scala @@ -196,6 +196,8 @@ object BuiltinTests extends TestSuite { } else { val configCompiler = if (check.scala2) """@ interp.configureCompiler(_.settings.language.tryToSet(List("dynamics")))""" + else if (check.scala3_5_1OrHigher) + """@ interp.preConfigureCompiler(ctx => ctx.setSetting(ctx.settings.language, ctx.settings.language.choices.toList.flatten.asInstanceOf[List[dotty.tools.dotc.config.Settings.Setting.ChoiceWithHelp[String]]].filter(_.name == "dynamics")))""" else """@ interp.preConfigureCompiler(ctx => ctx.setSetting(ctx.settings.language, List("dynamics")))""" check.session(s""" diff --git a/build.sc b/build.sc index eb6212a94..95d928b62 100644 --- a/build.sc +++ b/build.sc @@ -63,7 +63,7 @@ val scala2_13Versions = 2.to(14) .map(v => s"2.13.${v}") // TODO: We can't have 3.4.0 & 3.4.1 until we solve https://github.com/com-lihaoyi/Ammonite/issues/1395 val scala34Versions = Seq("3.4.2", "3.4.3") -val scala35Versions = Seq("3.5.0") +val scala35Versions = Seq("3.5.0", "3.5.1") val scala2Versions = scala2_12Versions ++ scala2_13Versions val scala3Versions = scala34Versions ++ scala35Versions