Tools use the root's protobuf_java, which can be too old for aapt2-proto

オープン
#602 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 6 日以内に返信

まだ誰も着手していません。

評価

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

調査の方向性

Start in src/tools/java/com/google/devtools/build/android/BUILD and find the ResourceProcessorBusyBox target plus the two others that depend on @com_google_protobuf//:protobuf_java. Check how the aapt2-proto classes from @rules_android_maven get their GeneratedMessageV3 dependency. Done means those deps point at @rules_android_maven//:com_google_protobuf_protobuf_java and the tools build and run. The maintainer has not yet confirmed this change, so check with them before opening a PR.

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

説明

In src/tools/java/com/google/devtools/build/android/BUILD, ResourceProcessorBusyBox and two other targets depend on @com_google_protobuf//:protobuf_java, i.e. whatever protobuf the root module picks. The prebuilt aapt2-proto classes from @rules_android_maven need GeneratedMessageV3, so a root on an older protobuf (4.27) gets a protobuf-java without it and the tools fail at runtime.

Pointing those deps at @rules_android_maven//:com_google_protobuf_protobuf_java (already resolved, 4.28.2) fixes it for us. Same on main and 0.7.3.

Would you take a PR making that the default? Not sure if anything compiled against @com_google_protobuf in the tools would then mismatch, so asking first.

主要言語
Java
スター
205
フォーク
113
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

bazelbuild/rules_android のほかの issue

bazelbuild/rules_android の issue をすべて見る

似ている issue

Java の issue をもっと見る

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

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