build_java8_legacy_dex.sh does not set JAVA_RUNFILES for the d8/r8 launchers
维护者通常 6 天内回复
评估
- 难度
- 1/5
- 预计耗时
- 1 小时以内
- 新手友好度
- 72/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 领域
- build-system
调研方向
先阅读 build_java8_legacy_dex.sh,并将其与 d8_desugar.sh 进行比较,后者已经导出 JAVA_RUNFILES="$0.runfiles"。修复方法是在调用 d8、r8 和 tracereferences 启动器之前添加相同的导出。要验证,构建 //tools/android:java8_legacy_dex,使用 --spawn_strategy=local,同时 JAVA_RUNFILES 指向另一个 runfiles 树;完成意味着启动器从脚本自身的 runfiles 中解析 jar,并且构建成功。
由索引模型根据 Issue 内容生成。
描述
build_java8_legacy_dex.sh runs the d8, r8 and tracereferences Java launchers, but it does not set JAVA_RUNFILES. d8_desugar.sh already does (export JAVA_RUNFILES="$0.runfiles").
A Bazel Java launcher uses JAVA_RUNFILES from the environment when it is set. When the java8_legacy_dex genrule runs unsandboxed, the variable can point at another target's runfiles tree, so the launchers look for their jars in the wrong place and the build fails.
How to reproduce: build //tools/android:java8_legacy_dex unsandboxed (--spawn_strategy=local) from an environment where JAVA_RUNFILES points to a different runfiles tree.
Fix: export JAVA_RUNFILES="$0.runfiles" in build_java8_legacy_dex.sh, the same as d8_desugar.sh. I will send a PR with a test that checks the launchers see the script's own runfiles.
Assisted by Claude.
- 主要语言
- Java
- 星标
- 205
- 派生
- 113
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
bazelbuild/rules_android 的其他 Issue
-
`Desugar` actions don't run on multiplex workers可能已有人在做 @lukaciko 于 46 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
bazelbuild/rules_android#539 · 2 条评论 ·
维护者通常 6 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
bazelbuild/rules_android#535 · 2 个 reaction ·
维护者通常 6 天内回复
-
desugar_globals output is not reproducible (zip entry order varies)可能已有人在做 @TrapsterDK 于 6 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 30/100
bazelbuild/rules_android#610 ·
维护者通常 6 天内回复
-
难度 2/5 1-3 小时 新手友好度 42/100
bazelbuild/rules_android#602 ·
维护者通常 6 天内回复
-
难度 5/5 一周以上 新手友好度 30/100
bazelbuild/rules_android#598 · 1 条评论 ·
维护者通常 6 天内回复
查看 bazelbuild/rules_android 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
Lincoln-cn/JAiRouter#1473 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
exercism/java-analyzer#379 ·
-
area: ui bug priority: low
难度 2/5 1-3 小时 新手友好度 66/100
tetsuji16/microProject#1893 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
liberation-data/fornax4j#325 ·
维护者通常 1 天内回复
-
[Bug]: FE and Kinesis extraction pipes render flow starting at the centre and scroll the source arm backwards可能已有人在做 @chonkzillaofficial 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 79/100
BCCE-team/BuildCraft#85 ·