-
Notifications
You must be signed in to change notification settings - Fork 314
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
Build ORT with Java 21 #9134
Merged
Merged
Build ORT with Java 21 #9134
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sschuberth
force-pushed
the
java-21
branch
3 times, most recently
from
September 18, 2024 17:16
9eec5b5
to
5fe6b9c
Compare
sschuberth
force-pushed
the
java-21
branch
2 times, most recently
from
September 18, 2024 20:16
a88325d
to
78fee4a
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #9134 +/- ##
=========================================
Coverage 67.10% 67.10%
Complexity 1187 1187
=========================================
Files 240 240
Lines 7904 7904
Branches 908 908
=========================================
Hits 5304 5304
Misses 2232 2232
Partials 368 368
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
sschuberth
force-pushed
the
java-21
branch
10 times, most recently
from
September 20, 2024 17:43
4d36091
to
aa407af
Compare
mnonnenmacher
requested changes
Sep 30, 2024
sschuberth
force-pushed
the
java-21
branch
2 times, most recently
from
September 30, 2024 19:10
f315b16
to
109ec00
Compare
Use K2 for KSP to make KSP use the Gradle daemon instead of its own [1]. Then also configure the JVM to be used by the Gradle daemon [2], as the daemon is not affected by the regular toolchains mechanism [3]. Also see [4] for some background information. [1]: https://github.com/google/ksp/blob/main/docs/ksp2.md#using-ksp-2-in-gradle [2]: https://docs.gradle.org/current/userguide/gradle_daemon.html#sec:daemon_jvm_criteria [3]: https://docs.gradle.org/current/userguide/toolchains.html [4]: google/ksp#740 Signed-off-by: Sebastian Schuberth <sebastian@doubleopen.org>
Commit 57dc97a wrongly claimed that the Security Manager was removed in Java 17; it was only deprecated in that version. However, it was removed in Java 21 without a substitute [1]. Remove a test that depends on the Security Manager to be able to upgrade to Java 21. [1]: https://bugs.openjdk.org/browse/JDK-8199704 Signed-off-by: Sebastian Schuberth <sebastian@doubleopen.org>
This works around a bug on Fedora Linux where the system "JDK" (that does not include `javac`) is chosen over a Adoptium / Temurin JDK, which fails. Signed-off-by: Sebastian Schuberth <sebastian@doubleopen.org>
Align with `gradle-model` to avoid problems when starting to build all of ORT with a newer Java version. Signed-off-by: Sebastian Schuberth <sebastian@doubleopen.org>
Test projects mostly use Gradle 7.5.1 and 7.4.2 which are incompatible with modern Java versions like 21. Based on [1], use Java 17 for these independently of the Java version that runs ORT. [1]: https://docs.gradle.org/current/userguide/compatibility.html Signed-off-by: Sebastian Schuberth <sebastian@doubleopen.org>
As fcfab20 decoupled the Java version to use for analysis of Gradle projects from the Java version running ORT, finally update the Java version from 11 / 17 to 21. See [1] for context. Also stop using the deprecated `Thread.id` in favor of `Thread.threadId()` and ensure to run with Java 21 when generating completion scripts. [1]: #8249 Signed-off-by: Sebastian Schuberth <sebastian@doubleopen.org>
mnonnenmacher
approved these changes
Oct 1, 2024
mnonnenmacher
added a commit
to boschglobal/ort-server
that referenced
this pull request
Oct 7, 2024
With the upgrade of the GitHub action runners to ubuntu-24.04 in 1234567, the default Java version has changed to Java 17 (compare [1] and [2]). This breaks the build of the analyzer worker build using JDK 11, because the server code is now built with an incompatible class file version. Fix this by switching back to using JDK 11 in the Docker build workflow. This is only a temporary solution, as the next ORT release will only be available for Java 21 [3]. With this upgrade the JDK bootstrapping mechanism introduced in recent ORT releases has to be used, instead of building analyzer worker images with different JDKs. [1]: https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md#java [2]: https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md#java [3]: oss-review-toolkit/ort#9134 Signed-off-by: Martin Nonnenmacher <martin.nonnenmacher@bosch.com>
github-merge-queue bot
pushed a commit
to eclipse-apoapsis/ort-server
that referenced
this pull request
Oct 7, 2024
With the upgrade of the GitHub action runners to ubuntu-24.04 in 1234567, the default Java version has changed to Java 17 (compare [1] and [2]). This breaks the build of the analyzer worker build using JDK 11, because the server code is now built with an incompatible class file version. Fix this by switching back to using JDK 11 in the Docker build workflow. This is only a temporary solution, as the next ORT release will only be available for Java 21 [3]. With this upgrade the JDK bootstrapping mechanism introduced in recent ORT releases has to be used, instead of building analyzer worker images with different JDKs. [1]: https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md#java [2]: https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md#java [3]: oss-review-toolkit/ort#9134 Signed-off-by: Martin Nonnenmacher <martin.nonnenmacher@bosch.com>
kamil-bielecki-bosch
pushed a commit
to boschglobal/ort-server
that referenced
this pull request
Oct 11, 2024
With the upgrade of the GitHub action runners to ubuntu-24.04 in 1234567, the default Java version has changed to Java 17 (compare [1] and [2]). This breaks the build of the analyzer worker build using JDK 11, because the server code is now built with an incompatible class file version. Fix this by switching back to using JDK 11 in the Docker build workflow. This is only a temporary solution, as the next ORT release will only be available for Java 21 [3]. With this upgrade the JDK bootstrapping mechanism introduced in recent ORT releases has to be used, instead of building analyzer worker images with different JDKs. [1]: https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md#java [2]: https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md#java [3]: oss-review-toolkit/ort#9134 Signed-off-by: Martin Nonnenmacher <martin.nonnenmacher@bosch.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As fcfab20 decoupled the Java version to use for analysis of Gradle projects from the Java version running ORT, finally update the Java version from 11 / 17 to 21. See 1 for context.