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

未关闭
#602 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 6 天内回复

还没有人认领这个 Issue。

评估

难度
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

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

bazelbuild/rules_android 的其他 Issue

查看 bazelbuild/rules_android 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。