Skip to content

test JDK23 #2075

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

Merged
merged 1 commit into from
Jan 31, 2025
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu"]
jvm: ["8", "11", "17", "21", "22"]
jvm: ["8", "11", "17", "21", "23"]
include:
- os: windows
jvm: 21
Expand Down
16 changes: 8 additions & 8 deletions project/ScalafixBuild.scala
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ object ScalafixBuild extends AutoPlugin with GhpagesKeys {

// https://github.com/scalameta/scalameta/issues/2485
lazy val coreScalaVersions = Seq(scala212, scala213)
lazy val cliScalaVersions = Seq(
scala212,
scala213,
scala33,
scala35,
scala36,
scala3Next
).distinct
lazy val cliScalaVersions = {
val jdk = System.getProperty("java.specification.version").toDouble
val scala3Versions =
// Scala 3.5 will never support JDK 23
if (jdk >= 23) Seq(scala33, scala36)
else Seq(scala33, scala35, scala36)
(coreScalaVersions ++ scala3Versions :+ scala3Next).distinct
}
lazy val cliScalaVersionsWithTargets: Seq[(String, TargetAxis)] =
cliScalaVersions.map(sv => (sv, TargetAxis(sv))) ++
Seq(scala213, scala212).flatMap { sv =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ import scalafix.tests.BuildInfo
*/
class ScalafixSuite extends AnyFunSuite {

val jdk: Double = System.getProperty("java.specification.version").toDouble

val scalaVersion: String = BuildInfo.scalaVersion

val repositories: java.util.List[Repository] = Seq[Repository](
Expand Down Expand Up @@ -117,11 +119,13 @@ class ScalafixSuite extends AnyFunSuite {
}

test("classload Scala 3.5 with full version") {
if (jdk >= 23) cancel("Scala 3.5 is not supported on JDK23+")
val scalafixAPI = Scalafix.fetchAndClassloadInstance("3.5.2", repositories)
assert(scalafixAPI.scalaVersion() == Versions.scala35)
}

test("classload Scala 3.5 with major.minor version") {
if (jdk >= 23) cancel("Scala 3.5 is not supported on JDK23+")
val scalafixAPI = Scalafix.fetchAndClassloadInstance("3.5", repositories)
assert(scalafixAPI.scalaVersion() == Versions.scala35)
}
Expand Down