bazelbuild / bazelbuild/rules_java

`rules_java` seem to not work with `--nolegacy_external_runfiles` flag

オープン
#203 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
P3
主要言語
Starlark
スター
103
フォーク
102
PR マージ指標
30日以内にマージされた PR はありません

説明

The flag docs state:
```# Do not build runfiles symlink forests for external repositories under
# `.runfiles/wsname/external/repo` (in addition to `.runfiles/repo`). This reduces runfiles &
# sandbox creation times & prevents accidentally depending on this feature which may flip to off by
# default in the future. Note, some rules may fail under this flag, please file issues with the rule
# author.
# Docs: https://bazel.build/reference/command-line-reference#flag--legacy_external_runfiles
```

If the flag is added to `.bazelrc`, tests fail with java not found:
```
/private/var/tmp/_bazel_Dan/30d3419be7d4a27db6dff5dc2d690288/sandbox/darwin-sandbox/5542/execroot/_main/bazel-out/darwin_x86_64-fastbuild/bin/plugin-bazel/src/plugin_tests.runfiles/_main/plugin-bazel/src/plugin_tests: line 409: /private/var/tmp/_bazel_Dan/30d3419be7d4a27db6dff5dc2d690288/sandbox/darwin-sandbox/5542/execroot/_main/bazel-out/darwin_x86_64-fastbuild/bin/plugin-bazel/src/plugin_tests.runfiles/_main/external/rules_java~~toolchains~local_jdk/bin/java: No such file or directory
```

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

--nolegacy_external_runfiles を .bazelrc に追加し、影響を受けるプラグインテストを実行して失敗を再現します。まず、409 行付近にある生成済みの plugin_tests.runfiles スクリプトと、rules_java のローカル JDK パスを確認します。フラグを有効にした状態で Java テストが java を見つけてパスすれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java
領域
build-system
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。