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

feat(java_common): improve JDK19 source compatibility #5432

Merged
merged 1 commit into from
Nov 8, 2022

Conversation

shahms
Copy link
Contributor

@shahms shahms commented Nov 8, 2022

Note: there remain a pair of test failures when running tests under JDK19, but those will be addressed in the future. This is enough to get things working for now.

@shahms shahms requested review from jaysachs and a team November 8, 2022 19:42
@shahms shahms merged commit ce8e3b1 into kythe:master Nov 8, 2022
@shahms shahms deleted the java-jdk19-compatibility branch November 8, 2022 20:30
@meteorcloudy
Copy link

This change isn't going to be compatible with Bazel@HEAD or the upcoming Bazel 6.0 release.
See https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/2727#01845a28-fd78-4548-b5d4-4aec531d20cd

ERROR: /var/lib/buildkite-agent/builds/bk-docker-j2dn/bazel-downstream-projects/kythe/WORKSPACE:141:23: //external:remotejdk19_linux: no such attribute 'exec_compatible_with' in 'http_archive' rule
ERROR: error loading package 'external': Package 'external' contains errors
Traceback (most recent call last):
  File "bazelci.py", line 3609, in <module>
    sys.exit(main())
  File "bazelci.py", line 3576, in main
    execute_commands(
  File "bazelci.py", line 1301, in execute_commands
    bazel_version = print_bazel_version_info(bazel_binary, platform)
  File "bazelci.py", line 1544, in print_bazel_version_info
    execute_command(
  File "bazelci.py", line 2270, in execute_command
    return subprocess.run(
  File "/usr/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,

@shahms
Copy link
Contributor Author

shahms commented Nov 9, 2022

Thanks for the heads-up. I'll double check, but ISTR that using target_compatible_with breaks now, any recommendations there?

@shahms
Copy link
Contributor Author

shahms commented Nov 9, 2022

This was changed in bazelbuild/bazel@d5559c1 in an incompatible fashion; there's no way to support both 5.x and 6.0 without awkward version checks.

@meteorcloudy
Copy link

@comius Have you ever dealt with similar problem? What's the best way to check the Bazel version or check which attribute name to use?

@shahms
Copy link
Contributor Author

shahms commented Nov 9, 2022

#5437 (isn't pretty, but should work)

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.

None yet

3 participants