bazelbuild / bazelbuild/rules_java

Missing symbols when building with --incompatible_autoload_externally=-@rules_java

Abierto
#289 1 comentario 0 reacciones 0 asignados Ver en GitHub
P2
Lenguaje dominante
Starlark
Estrellas
103
Forks
102
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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.

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
java
Área
build-system
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.