desugar_globals output is not reproducible (zip entry order varies)
メンテナーはふだん 6 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 30/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
調査の方向性
Start with the //tools/android:desugar_globals and desugar_globals_classes genrules in tools/android/BUILD, then run the issue’s GlobalSyntheticsGenerator reproduction command. The work is done when both genrules enable deterministic mode and repeated runs produce identical .globals output that can be remote-cached. Note that linked PR #611 already proposes this change.
索引モデルが issue の本文から書いたものです。
説明
//tools/android:desugar_globals is not reproducible. The genrule runs R8's GlobalSyntheticsGenerator and the entry order of the .globals zip it writes changes from run to run. The zip is the input of desugar_globals_dex_archive, so the same source tree gives different outputs and misses the remote cache.
Reproduce with the R8 version rules_android pins (com.android.tools:r8:9.3.16), without Bazel. The command line is the one in tools/android/BUILD:
curl -sSLO https://maven.google.com/com/android/tools/r8/9.3.16/r8-9.3.16.jar
for i in 1 2 3 4 5 6 7 8; do
java -Dcom.android.tools.r8.disableLambdaMethodAnnotations \
-cp r8-9.3.16.jar com.android.tools.r8.GlobalSyntheticsGenerator \
--min-api 23 --output run$i.globals
done
sha256sum run*.globals | cut -d' ' -f1 | sort | uniq -c
Actual: 8 runs gave 4 different hashes (3/3/1/1). unzip -Z1 shows the same six entries in different orders, for example RecordTag.global first in one run and DesugarVarHandle$0.global first in another.
Expected: the same bytes on every run.
Adding -Dcom.android.tools.r8.deterministicdebugging=1 to the command makes all 8 runs identical (one hash, 8/8).
The --classfile variant used by desugar_globals_classes produced identical output in 12 runs here, but it runs the same generator.
Environment: Linux x86_64, OpenJDK 25, rules_android main (5a9ce60), same behavior expected for 0.8.1.
I will send a PR that sets the flag on both genrules.
Assisted by Claude.
- 主要言語
- Java
- スター
- 205
- フォーク
- 113
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
bazelbuild/rules_android のほかの issue
-
build_java8_legacy_dex.sh does not set JAVA_RUNFILES for the d8/r8 launchers対応中かも @TrapsterDK が 17 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
bazelbuild/rules_android#599 ·
メンテナーはふだん 6 日以内に返信
-
`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 件 ·
メンテナーはふだん 6 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 42/100
bazelbuild/rules_android#602 ·
メンテナーはふだん 6 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 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 ·