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

Incompatible with latest bazel rolling release #57

Closed
jpsim opened this issue Jul 20, 2022 · 1 comment · Fixed by #58
Closed

Incompatible with latest bazel rolling release #57

jpsim opened this issue Jul 20, 2022 · 1 comment · Fixed by #58
Assignees
Labels
P2 We'll consider to work on this in future. (Assignee optional)

Comments

@jpsim
Copy link
Contributor

jpsim commented Jul 20, 2022

The toolchains defined in this ruleset no longer work as of the latest bazel rolling release (6.0.0-pre.20220630.1).

With bazelisk:

$ echo "6.0.0-pre.20220630.1" > .bazelversion
$ bazel build //toolchains:toolchain_java8 
Starting local Bazel server and connecting to it...
ERROR: /Users/jsimard/src/rules_java/toolchains/BUILD:212:27: no such target '@remote_java_tools//:java_compiler_jar': target 'java_compiler_jar' not declared in package '' defined by /private/var/tmp/_bazel_jsimard/95ec1fe9f24ed3702894a39337881861/external/remote_java_tools/BUILD and referenced by '//toolchains:toolchain_java8'
ERROR: /Users/jsimard/src/rules_java/toolchains/BUILD:212:27: no such target '@remote_java_tools//:jdk_compiler_jar': target 'jdk_compiler_jar' not declared in package '' defined by /private/var/tmp/_bazel_jsimard/95ec1fe9f24ed3702894a39337881861/external/remote_java_tools/BUILD and referenced by '//toolchains:toolchain_java8'
ERROR: Analysis of target '//toolchains:toolchain_java8' failed; build aborted: Analysis failed
INFO: Elapsed time: 2.661s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (6 packages loaded, 6 targets configured)

The previous release works just fine:

$ echo "6.0.0-pre.20220608.2" > .bazelversion
$ bazel build //toolchains:toolchain_java8 
INFO: Analyzed target //toolchains:toolchain_java8 (52 packages loaded, 809 targets configured).
INFO: Found 1 target...
Target //toolchains:toolchain_java8 up-to-date (nothing to build)
INFO: Elapsed time: 9.908s, Critical Path: 0.02s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action

It started failing as of this bazel commit: bazelbuild/bazel@8349a39

Which I believe is applying this change: bazelbuild/bazel@6ad6de9

If that's the case, it's my understanding that rules_java will need to stop using the java_compiler_jar and jdk_compiler_jar from remote_java_tools. Perhaps this could be done by vendoring these compiler jars in rules_java itself. I'll let maintainers decide the best way to handle this.

@comius
Copy link
Collaborator

comius commented Jul 20, 2022

Thanks for a great analysis!

@comius comius self-assigned this Jul 20, 2022
@comius comius added the P2 We'll consider to work on this in future. (Assignee optional) label Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 We'll consider to work on this in future. (Assignee optional)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants