bazelbuild / bazelbuild/rules_java
`rules_java` seem to not work with `--nolegacy_external_runfiles` flag
- 主要語言
- 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