Commit e8edc5d
Restore JDK8 compatibility in Bazel for libraries with dependencies from 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: 7393231251 parent 5680834 commit e8edc5d
2 files changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
| 37 | + | |
39 | 38 | | |
40 | 39 | | |
41 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
| 166 | + | |
166 | 167 | | |
167 | 168 | | |
168 | 169 | | |
| |||
184 | 185 | | |
185 | 186 | | |
186 | 187 | | |
| 188 | + | |
187 | 189 | | |
188 | 190 | | |
189 | 191 | | |
| |||
0 commit comments