bazelbuild / bazelbuild/rules_java

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

未关闭
#289 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
P2
主要语言
Starlark
星标
103
派生
102
PR 合并指标
30 天内没有已合并 PR

描述

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.

贡献指南

打开贡献指南

调研方向

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.

由索引模型根据 Issue 内容生成。

评估

技术栈
java
领域
build-system
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。