bazelbuild / bazelbuild/rules_java

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

オープン
#289 コメント 1 件 リアクション 0 件 担当者 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 を短くまとめたダイジェスト。