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

fix: determine the version of java correctly #1069

Conversation

yesudeep
Copy link
Contributor

@yesudeep yesudeep commented Mar 14, 2024

Fedora Linux has updated its latest JDK to version 22-ea and that breaks the version parsing routine on here.

zsh❯ java --version
openjdk 22-ea 2024-03-19
OpenJDK Runtime Environment (Red_Hat-22.0.0.0.36-1) (build 22-ea+36)
OpenJDK 64-Bit Server VM (Red_Hat-22.0.0.0.36-1) (build 22-ea+36, mixed mode, sharing)

zsh❯ which java
/usr/lib/jvm/java-22-openjdk/bin/java

The rewritten version parser should adapt better.

@yesudeep yesudeep force-pushed the yesudeep/fix/build-failure-on-jdk-22-ea-1068 branch 5 times, most recently from 44ce0e3 to dffee13 Compare March 14, 2024 04:18
@yesudeep
Copy link
Contributor Author

I'm not sure about how to fix this:

exec ${PAGER:-/usr/bin/less} "$0" || exit 1
Executing tests from //src/test:main_activity_test
-----------------------------------------------------------------------------
JUnit4 Test Runner
java.lang.UnsupportedOperationException: The Security Manager is deprecated and will be removed in a future release
	at java.base/java.lang.System.setSecurityManager(System.java:429)
	at com.google.testing.junit.runner.junit4.JUnit4Runner.installSecurityManager(JUnit4Runner.java:256)
	at com.google.testing.junit.runner.junit4.JUnit4Runner.run(JUnit4Runner.java:113)
	at com.google.testing.junit.runner.BazelTestRunner.runTestsInSuite(BazelTestRunner.java:145)
	at com.google.testing.junit.runner.BazelTestRunner.main(BazelTestRunner.java:76)

BazelTestRunner exiting with a return value of 1
JVM shutdown hooks (if any) will run now.
The JVM will exit once they complete.

-- JVM shutdown starting at 2024-03-14 04:27:56 --

@yesudeep yesudeep force-pushed the yesudeep/fix/build-failure-on-jdk-22-ea-1068 branch 3 times, most recently from 08d8182 to df88330 Compare March 14, 2024 05:58
Copy link
Collaborator

@jin jin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

The SecurityManager failure is not related, already happening at HEAD. https://buildkite.com/bazel/rules-jvm-external-examples/builds/3809

private/java_utilities.bzl Show resolved Hide resolved
@yesudeep yesudeep force-pushed the yesudeep/fix/build-failure-on-jdk-22-ea-1068 branch from df88330 to b91f1b9 Compare March 14, 2024 08:38
@yesudeep yesudeep force-pushed the yesudeep/fix/build-failure-on-jdk-22-ea-1068 branch from b91f1b9 to b6256b1 Compare March 14, 2024 08:42
@jin jin merged commit 2282f2c into bazel-contrib:master Mar 14, 2024
7 of 8 checks passed
@yesudeep yesudeep deleted the yesudeep/fix/build-failure-on-jdk-22-ea-1068 branch June 14, 2024 05:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants