`rules_java` seem to not work with `--nolegacy_external_runfiles` flag
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- java
- Domain
- build-system
Research direction
Reproduce the failure by adding --nolegacy_external_runfiles to .bazelrc and running the affected plugin tests. Start with the generated plugin_tests.runfiles script around line 409 and the external rules_java local JDK path; done means the Java tests locate java and pass with the flag enabled.
Written by the indexing model from the issue text.
Description
The flag docs state:
# `.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
- Dominant language
- Starlark
- Stars
- 103
- Forks
- 102
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bazelbuild/rules_java
-
P4
Difficulty 4/5 3-5 days Newbie friendliness 55/100
bazelbuild/rules_java#360 · 4 comments · 2 reactions ·
-
P4
Difficulty 5/5 Over a week Newbie friendliness 35/100
bazelbuild/rules_java#354 · 8 comments ·
-
P3 question
Difficulty 3/5 1-2 days Newbie friendliness 45/100
bazelbuild/rules_java#339 · 1 comment ·
-
P3
Difficulty 4/5 3-5 days Newbie friendliness 35/100
bazelbuild/rules_java#325 · 8 comments ·
-
P4
Difficulty 4/5 3-5 days Newbie friendliness 35/100
bazelbuild/rules_java#316 · 2 reactions ·
All issues in bazelbuild/rules_java
Similar issues
-
type/automation type/tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
priority: p3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
googleapis/librarian#7636 ·
-
package-update
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
oSoWoSo/vOid_Community_repOsitory#147 · 1 comment ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
agentic-workflows cascade-suspected
Difficulty 1/5 Under an hour Newbie friendliness 88/100