Restore JDK8 compatibility in Bazel for libraries with dependencies f…#20832
Merged
Restore JDK8 compatibility in Bazel for libraries with dependencies f…#20832
Conversation
…rom Maven (e.g. //java/util)
Adds lock_files to MODULE.bazel for maven dependencies to bypass rules_jvm_external's use of coursier to resolve dependency which is no longer JDK 8 compatible.
```
ERROR: An error occurred during the fetch of repository 'rules_jvm_external~~maven~protobuf_maven':
Traceback (most recent call last):
File "/workspace/_build/out/external/rules_jvm_external~/private/rules/coursier.bzl", line 993, column 38, in _coursier_fetch_impl
dep_tree = make_coursier_dep_tree(
File "/workspace/_build/out/external/rules_jvm_external~/private/rules/coursier.bzl", line 926, column 13, in make_coursier_dep_tree
fail("Error while fetching artifact with coursier: " + exec_result.stderr)
Error in fail: Error while fetching artifact with coursier: Error: Could not find or load main class @.workspace._build.out.external.rules_jvm_external~~maven~protobuf_maven.java_argsfile
ERROR: <builtin>: fetching coursier_fetch rule //:rules_jvm_external~~maven~protobuf_maven: Traceback (most recent call last):
File "/workspace/_build/out/external/rules_jvm_external~/private/rules/coursier.bzl", line 993, column 38, in _coursier_fetch_impl
dep_tree = make_coursier_dep_tree(
File "/workspace/_build/out/external/rules_jvm_external~/private/rules/coursier.bzl", line 926, column 13, in make_coursier_dep_tree
fail("Error while fetching artifact with coursier: " + exec_result.stderr)
Error in fail: Error while fetching artifact with coursier: Error: Could not find or load main class @.workspace._build.out.external.rules_jvm_external~~maven~protobuf_maven.java_argsfile
ERROR: no such package '@@rules_jvm_external~~maven~protobuf_maven//': Error while fetching artifact with coursier: Error: Could not find or load main class @.workspace._build.out.external.rules_jvm_external~~maven~protobuf_maven.java_argsfile
ERROR: /workspace/java/util/BUILD.bazel:9:13: //java/util:util depends on @@rules_jvm_external~~maven~protobuf_maven//:com_google_j2objc_j2objc_annotations in repository @@rules_jvm_external~~maven~protobuf_maven which failed to fetch. no such package '@@rules_jvm_external~~maven~protobuf_maven//': Error while fetching artifact with coursier: Error: Could not find or load main class @.workspace._build.out.external.rules_jvm_external~~maven~protobuf_maven.java_argsfile
ERROR: Analysis of target '//java/util:util' failed; build aborted: Analysis failed
```
PiperOrigin-RevId: 739323125
This file contains hidden or 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
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.
…rom Maven (e.g. //java/util)
Adds lock_files to MODULE.bazel for maven dependencies to bypass rules_jvm_external's use of coursier to resolve dependency which is no longer JDK 8 compatible.
PiperOrigin-RevId: 739323125