bazelbuild / bazelbuild/rules_java
Missing symbols when building with --incompatible_autoload_externally=-@rules_java
- Langage dominant
- Starlark
- Étoiles
- 103
- Forks
- 102
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
Trying to do the migration for https://github.com/bazelbuild/bazel/issues/23043 I found that it is not yet possible to build without that native java rules.
```
ERROR: /home/limdor/.cache/bazel/_bazel_limdor/7847781caf1fd5388b007bf353d8df72/external/rules_java+/java/private/native.bzl:19:12: name 'java_common' is not defined (did you mean 'cc_common'?)
ERROR: Analysis of target '//dynamic_memory/proc_maps:proc_maps' failed; build aborted: Error loading '@@rules_java+//java:extensions.bzl' for module extensions, requested by @@bazel_tools//:MODULE.bazel:20:32: at /home/limdor/.cache/bazel/_bazel_limdor/7847781caf1fd5388b007bf353d8df72/external/rules_java+/java/extensions.bzl:18:5: at /home/limdor/.cache/bazel/_bazel_limdor/7847781caf1fd5388b007bf353d8df72/external/rules_java+/java/repositories.bzl:20:6: at /home/limdor/.cache/bazel/_bazel_limdor/7847781caf1fd5388b007bf353d8df72/external/rules_java+/toolchains/local_java_repository.bzl:17:6: at /home/limdor/.cache/bazel/_bazel_limdor/7847781caf1fd5388b007bf353d8df72/external/rules_java+/java/toolchains/java_runtime.bzl:16:6: at /home/limdor/.cache/bazel/_bazel_limdor/7847781caf1fd5388b007bf353d8df72/external/rules_java++compatibility_proxy+compatibility_proxy/proxy.bzl:2:6: at /home/limdor/.cache/bazel/_bazel_limdor/7847781caf1fd5388b007bf353d8df72/external/rules_java+/java/bazel/rules/bazel_java_binary_wrapper.bzl:26:6: compilation of module 'java/private/native.bzl' failed: at /home/limdor/.cache/bazel/_bazel_limdor/7847781caf1fd5388b007bf353d8df72/external/rules_java+/java/extensions.bzl:18:5: at /home/limdor/.cache/bazel/_bazel_limdor/7847781caf1fd5388b007bf353d8df72/external/rules_java+/java/repositories.bzl:20:6: at /home/limdor/.cache/bazel/_bazel_limdor/7847781caf1fd5388b007bf353d8df72/external/rules_java+/toolchains/local_java_repository.bzl:17:6: at /home/limdor/.cache/bazel/_bazel_limdor/7847781caf1fd5388b007bf353d8df72/external/rules_java+/java/toolchains/java_runtime.bzl:16:6: at /home/limdor/.cache/bazel/_bazel_limdor/7847781caf1fd5388b007bf353d8df72/external/rules_java++compatibility_proxy+compatibility_proxy/proxy.bzl:2:6: at /home/limdor/.cache/bazel/_bazel_limdor/7847781caf1fd5388b007bf353d8df72/external/rules_java+/java/bazel/rules/bazel_java_binary_wrapper.bzl:26:6: compilation of module 'java/private/native.bzl' failed
```
For details and how to reproduce it see https://github.com/bazelbuild/bazel/issues/23043#issuecomment-2819019410
I assume from https://github.com/bazelbuild/rules_java/blob/043d9760314a57f828d7e6b20898114420adea92/java/private/native.bzl#L18 that the error is because rules_java is not yet ready to be build with the incompatible flag due to not having everything in Starlark.
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Start with java/private/native.bzl at the referenced line and follow the reproduction details in Bazel issue 23043. Investigate the missing java_common symbol when building with --incompatible_autoload_externally=-@rules_java, and verify that the affected build completes without the reported module-compilation errors.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- java
- Domaine
- build-system
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 35/100