From 459c6f7cc5b1bf771a2e9155dde3346a9d318458 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Kozak?= Date: Fri, 7 Nov 2025 10:18:49 +0100 Subject: [PATCH 1/5] Add support for Java 25 in GitHub Actions workflow --- .github/workflows/ci.yml | 18 +++++++++++++++++- build.sbt | 2 +- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0976fb2..95e836a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ jobs: matrix: os: [ubuntu-latest] scala: [2.13.16] - java: [temurin@17, temurin@21] + java: [temurin@17, temurin@21, temurin@25] runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (full) @@ -48,6 +48,14 @@ jobs: java-version: 21 cache: sbt + - name: Setup Java (temurin@25) + if: matrix.java == 'temurin@25' + uses: actions/setup-java@v5 + with: + distribution: temurin + java-version: 25 + cache: sbt + - name: Setup sbt uses: sbt/setup-sbt@v1 @@ -98,6 +106,14 @@ jobs: java-version: 21 cache: sbt + - name: Setup Java (temurin@25) + if: matrix.java == 'temurin@25' + uses: actions/setup-java@v5 + with: + distribution: temurin + java-version: 25 + cache: sbt + - name: Setup sbt uses: sbt/setup-sbt@v1 diff --git a/build.sbt b/build.sbt index 3ff0827..bd087e0 100644 --- a/build.sbt +++ b/build.sbt @@ -4,7 +4,7 @@ inThisBuild(Seq( organization := "com.avsystem.scex", scalaVersion := "2.13.16", githubWorkflowTargetTags ++= Seq("v*"), - githubWorkflowJavaVersions := Seq(JavaSpec.temurin("17"), JavaSpec.temurin("21")), + githubWorkflowJavaVersions := Seq(JavaSpec.temurin("17"), JavaSpec.temurin("21"), JavaSpec.temurin("25")), githubWorkflowPublishTargetBranches := Seq(RefPredicate.StartsWith(Ref.Tag("v"))), githubWorkflowPublish := Seq(WorkflowStep.Sbt( From 7f0f729c3ee44d571fc4fee649dc5c26dba90db6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Kozak?= Date: Fri, 7 Nov 2025 13:10:07 +0100 Subject: [PATCH 2/5] test CI --- .github/workflows/ci.yml | 56 +++++++++++++++++++++++----------------- build.sbt | 8 +++++- 2 files changed, 39 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 95e836a..42fd84c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ jobs: matrix: os: [ubuntu-latest] scala: [2.13.16] - java: [temurin@17, temurin@21, temurin@25] + java: [temurin@25, zulu@25, corretto@25, openjdk@25] runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (full) @@ -32,35 +32,43 @@ jobs: with: fetch-depth: 0 - - name: Setup Java (temurin@17) - if: matrix.java == 'temurin@17' + - name: Setup Java (temurin@25) + if: matrix.java == 'temurin@25' uses: actions/setup-java@v5 with: distribution: temurin - java-version: 17 + java-version: 25 cache: sbt - - name: Setup Java (temurin@21) - if: matrix.java == 'temurin@21' + - name: Setup Java (zulu@25) + if: matrix.java == 'zulu@25' uses: actions/setup-java@v5 with: - distribution: temurin - java-version: 21 + distribution: zulu + java-version: 25 cache: sbt - - name: Setup Java (temurin@25) - if: matrix.java == 'temurin@25' + - name: Setup Java (corretto@25) + if: matrix.java == 'corretto@25' uses: actions/setup-java@v5 with: - distribution: temurin + distribution: corretto + java-version: 25 + cache: sbt + + - name: Setup Java (openjdk@25) + if: matrix.java == 'openjdk@25' + uses: actions/setup-java@v5 + with: + distribution: openjdk java-version: 25 cache: sbt - name: Setup sbt uses: sbt/setup-sbt@v1 - - name: Check that workflows are up to date - run: sbt '++ ${{ matrix.scala }}' githubWorkflowCheck +# - name: Check that workflows are up to date +# run: sbt '++ ${{ matrix.scala }}' githubWorkflowCheck - name: Build project run: sbt '++ ${{ matrix.scala }}' test @@ -82,7 +90,7 @@ jobs: matrix: os: [ubuntu-latest] scala: [2.13.16] - java: [temurin@17] + java: [temurin@25] runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (full) @@ -90,27 +98,27 @@ jobs: with: fetch-depth: 0 - - name: Setup Java (temurin@17) - if: matrix.java == 'temurin@17' + - name: Setup Java (temurin@25) + if: matrix.java == 'temurin@25' uses: actions/setup-java@v5 with: distribution: temurin - java-version: 17 + java-version: 25 cache: sbt - - name: Setup Java (temurin@21) - if: matrix.java == 'temurin@21' + - name: Setup Java (zulu@25) + if: matrix.java == 'zulu@25' uses: actions/setup-java@v5 with: - distribution: temurin - java-version: 21 + distribution: zulu + java-version: 25 cache: sbt - - name: Setup Java (temurin@25) - if: matrix.java == 'temurin@25' + - name: Setup Java (corretto@25) + if: matrix.java == 'corretto@25' uses: actions/setup-java@v5 with: - distribution: temurin + distribution: corretto java-version: 25 cache: sbt diff --git a/build.sbt b/build.sbt index bd087e0..49bfb69 100644 --- a/build.sbt +++ b/build.sbt @@ -4,7 +4,11 @@ inThisBuild(Seq( organization := "com.avsystem.scex", scalaVersion := "2.13.16", githubWorkflowTargetTags ++= Seq("v*"), - githubWorkflowJavaVersions := Seq(JavaSpec.temurin("17"), JavaSpec.temurin("21"), JavaSpec.temurin("25")), + githubWorkflowJavaVersions := Seq( + JavaSpec.temurin("25"), + JavaSpec.zulu("25"), + JavaSpec.corretto("25"), + ), githubWorkflowPublishTargetBranches := Seq(RefPredicate.StartsWith(Ref.Tag("v"))), githubWorkflowPublish := Seq(WorkflowStep.Sbt( @@ -84,7 +88,9 @@ lazy val subprojectSettings = Seq( Test / javaOptions += "-Xmx1G", Test / outputStrategy := Some(LoggedOutput(new Logger { def log(level: Level.Value, message: => String): Unit = () + def success(message: => String): Unit = () + def trace(t: => Throwable): Unit = () })), libraryDependencies ++= Seq( From 8254171c74e28daaf86e85c93b974f8a8d1c5b39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Kozak?= Date: Fri, 7 Nov 2025 13:13:32 +0100 Subject: [PATCH 3/5] test CI --- .github/workflows/ci.yml | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 42fd84c..f98d268 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ jobs: matrix: os: [ubuntu-latest] scala: [2.13.16] - java: [temurin@25, zulu@25, corretto@25, openjdk@25] + java: [temurin@25, zulu@25, corretto@25] runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (full) @@ -56,19 +56,11 @@ jobs: java-version: 25 cache: sbt - - name: Setup Java (openjdk@25) - if: matrix.java == 'openjdk@25' - uses: actions/setup-java@v5 - with: - distribution: openjdk - java-version: 25 - cache: sbt - - name: Setup sbt uses: sbt/setup-sbt@v1 -# - name: Check that workflows are up to date -# run: sbt '++ ${{ matrix.scala }}' githubWorkflowCheck + - name: Check that workflows are up to date + run: sbt '++ ${{ matrix.scala }}' githubWorkflowCheck - name: Build project run: sbt '++ ${{ matrix.scala }}' test From 3e08d311e8822b9bb2343cbd2d5cb73f1bc9a6d4 Mon Sep 17 00:00:00 2001 From: Dawid Dworak Date: Sat, 8 Nov 2025 13:22:21 +0100 Subject: [PATCH 4/5] Fix classfile directory removal on JDK25 Empty string used to be resolved as no directory, under Java 25 it resolves as the root directory due to https://bugs.openjdk.org/browse/JDK-8024695. This code was error-prone, and we should rely on the same directory resolution mechanism as in runtime. --- .../com/avsystem/scex/compiler/CompilationTest.scala | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/scex-core/src/test/scala/com/avsystem/scex/compiler/CompilationTest.scala b/scex-core/src/test/scala/com/avsystem/scex/compiler/CompilationTest.scala index 63c7633..bd48744 100644 --- a/scex-core/src/test/scala/com/avsystem/scex/compiler/CompilationTest.scala +++ b/scex-core/src/test/scala/com/avsystem/scex/compiler/CompilationTest.scala @@ -11,13 +11,8 @@ import com.avsystem.scex.validation.SymbolValidator.MemberAccessSpec import com.avsystem.scex.validation.{SymbolValidator, SyntaxValidator} import org.scalatest.{BeforeAndAfterAll, Suite} -import scala.reflect.io.AbstractFile import scala.util.control.NonFatal -/** - * Created: 18-11-2013 - * Author: ghik - */ trait CompilationTest extends BeforeAndAfterAll { this: Suite => val compiler = createCompiler @@ -28,11 +23,8 @@ trait CompilationTest extends BeforeAndAfterAll { this: Suite => new DefaultJavaScexCompiler(settings) } - override protected def beforeAll() = { - val classfileDir = AbstractFile.getDirectory(compiler.settings.classfileDirectory.value) - if (classfileDir != null) { - classfileDir.delete() - } + override protected def beforeAll(): Unit = { + compiler.settings.resolvedClassfileDir.foreach(_.delete()) } def catchAndPrint(code: => Any): Unit = From c56da5ffffbe927c29575132b47cf3f8b8d159ff Mon Sep 17 00:00:00 2001 From: Dawid Dworak Date: Sat, 8 Nov 2025 13:24:07 +0100 Subject: [PATCH 5/5] Revert to temurin Java distributions --- .github/workflows/ci.yml | 44 ++++++++++++++++++++-------------------- build.sbt | 6 +----- 2 files changed, 23 insertions(+), 27 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f98d268..95e836a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ jobs: matrix: os: [ubuntu-latest] scala: [2.13.16] - java: [temurin@25, zulu@25, corretto@25] + java: [temurin@17, temurin@21, temurin@25] runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (full) @@ -32,27 +32,27 @@ jobs: with: fetch-depth: 0 - - name: Setup Java (temurin@25) - if: matrix.java == 'temurin@25' + - name: Setup Java (temurin@17) + if: matrix.java == 'temurin@17' uses: actions/setup-java@v5 with: distribution: temurin - java-version: 25 + java-version: 17 cache: sbt - - name: Setup Java (zulu@25) - if: matrix.java == 'zulu@25' + - name: Setup Java (temurin@21) + if: matrix.java == 'temurin@21' uses: actions/setup-java@v5 with: - distribution: zulu - java-version: 25 + distribution: temurin + java-version: 21 cache: sbt - - name: Setup Java (corretto@25) - if: matrix.java == 'corretto@25' + - name: Setup Java (temurin@25) + if: matrix.java == 'temurin@25' uses: actions/setup-java@v5 with: - distribution: corretto + distribution: temurin java-version: 25 cache: sbt @@ -82,7 +82,7 @@ jobs: matrix: os: [ubuntu-latest] scala: [2.13.16] - java: [temurin@25] + java: [temurin@17] runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (full) @@ -90,27 +90,27 @@ jobs: with: fetch-depth: 0 - - name: Setup Java (temurin@25) - if: matrix.java == 'temurin@25' + - name: Setup Java (temurin@17) + if: matrix.java == 'temurin@17' uses: actions/setup-java@v5 with: distribution: temurin - java-version: 25 + java-version: 17 cache: sbt - - name: Setup Java (zulu@25) - if: matrix.java == 'zulu@25' + - name: Setup Java (temurin@21) + if: matrix.java == 'temurin@21' uses: actions/setup-java@v5 with: - distribution: zulu - java-version: 25 + distribution: temurin + java-version: 21 cache: sbt - - name: Setup Java (corretto@25) - if: matrix.java == 'corretto@25' + - name: Setup Java (temurin@25) + if: matrix.java == 'temurin@25' uses: actions/setup-java@v5 with: - distribution: corretto + distribution: temurin java-version: 25 cache: sbt diff --git a/build.sbt b/build.sbt index 49bfb69..4ecf9b0 100644 --- a/build.sbt +++ b/build.sbt @@ -4,11 +4,7 @@ inThisBuild(Seq( organization := "com.avsystem.scex", scalaVersion := "2.13.16", githubWorkflowTargetTags ++= Seq("v*"), - githubWorkflowJavaVersions := Seq( - JavaSpec.temurin("25"), - JavaSpec.zulu("25"), - JavaSpec.corretto("25"), - ), + githubWorkflowJavaVersions := Seq(JavaSpec.temurin("17"), JavaSpec.temurin("21"), JavaSpec.temurin("25")), githubWorkflowPublishTargetBranches := Seq(RefPredicate.StartsWith(Ref.Tag("v"))), githubWorkflowPublish := Seq(WorkflowStep.Sbt(