Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump Scala to 3.5.1 #1558

Merged
merged 2 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions amm/repl/src/test/scala/ammonite/DualTestRepl.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 2 additions & 0 deletions amm/repl/src/test/scala/ammonite/session/BuiltinTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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"""
Expand Down
2 changes: 1 addition & 1 deletion build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down