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

Abierto
#602 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 6 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
42/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
java
Área
build-system

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Java
Estrellas
205
Forks
113
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de bazelbuild/rules_android

Todos los issues de bazelbuild/rules_android

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.