mobile-install cache sharing
Los mantenedores suelen responder en 6 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 30/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Área
- build-system
Línea de trabajo
Start by reading @rules_android//mobile_install:mi.bzl and mobile_install/utils.bzl around MIASPECT and dex(), then compare their dex actions with dex_desugar_aspect. The issue asks whether reuse of per-jar .dex.zip outputs is viable and seeks maintainer guidance on the mobile-install roadmap; a first step is to check those entry points and the project’s current direction. Done would require a maintainer decision and likely design work, so this is not a self-contained first contribution.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Context
We are evaluating bazel mobile-install (the Starlark MIASPECT in @rules_android//mobile_install:mi.bzl) for the inner dev loop of a large android_binary app.
- Bazel 8.8.1, rules_android 0.6.0 (our local patches do not touch
mobile_install/or dexing) - Debug build, no ProGuard/R8
- About 158k actions in the normal build graph
What we see
Dex outputs are not shared between build and mobile-install
bazel aquery "deps(//app:bin)" --output=summary, with and without --aspects=@rules_android//mobile_install:mi.bzl%MIASPECT:
| Mnemonic | build | mobile-install | delta |
|---|---|---|---|
| DesugarDexSharding | 0 | 7,284 | +7,284 |
| ExtractJarResources | 0 | 3,018 | +3,018 |
| SignShellApp / MakeSplitApk / CompileAndroidManifest | 0 | 36 each | +108 |
| DexMerge | 0 | 33 | +33 |
| Total | 158,011 | 168,466 | +10,455 |
The normal build already dexes each jar with Desugar (9.7k) and DexBuilder (39k) through dex_desugar_aspect. The MI aspect (mobile_install/utils.bzl dex()) runs the same desugar and dexbuilder tools, but in one android_kit dex action per jar that writes N shard zips. The command line and outputs are different, so no action key overlaps with the normal build, local or remote. Resource processing is shared (MI adds no compile/link resource actions).
Results:
- A developer who uses both
bazel buildandbazel mobile-installdexes the app twice. - A cold
mobile-installon top of a fully built (and remote-cached) normal build ran about 6,700 local actions and took about 26 minutes on a laptop. - The MI outputs add about 3.5 GB under
bazel-bin/<app>_mi. - Remote caching helps only partly. To warm the cache, CI must run
mobile-installas well asbuild, which adds about 10.5k actions per run.
Questions
- Roadmap: What is the plan for
mobile-installin rules_android? Is theMIASPECTpath the long-term supported approach, or is there a plan to move to another approach (for example, build the normal APK and deploy deltas with the Studio deployer)? - By design? Is the separate dexing path in the MI aspect (
android_kit dexwith per-jar shards) intentionally independent ofdex_desugar_aspect? If yes, what is the reason (shard layout, incremental granularity, other)? - Reuse normal dexing: Would you accept a change that makes the MI aspect consume the per-jar
.dex.zipoutputs ofdex_desugar_aspect, and bucket whole jars into theDexMergeshards? This removes theDesugarDexShardingactions and lets MI share the cache withbuild. Are there known problems with this, such as shard balance or desugaring differences?
- Lenguaje dominante
- Java
- Estrellas
- 205
- Forks
- 113
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de bazelbuild/rules_android
-
build_java8_legacy_dex.sh does not set JAVA_RUNFILES for the d8/r8 launchersPosiblemente ocupada @TrapsterDK la tomó hace 17 días. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
bazelbuild/rules_android#599 ·
Los mantenedores suelen responder en 6 días
-
`Desugar` actions don't run on multiplex workersPosiblemente ocupada @lukaciko la tomó hace 46 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
bazelbuild/rules_android#539 · 2 comentarios ·
Los mantenedores suelen responder en 6 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
bazelbuild/rules_android#535 · 2 reacciones ·
Los mantenedores suelen responder en 6 días
-
desugar_globals output is not reproducible (zip entry order varies)Posiblemente ocupada @TrapsterDK la tomó hace 6 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 30/100
bazelbuild/rules_android#610 ·
Los mantenedores suelen responder en 6 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 42/100
bazelbuild/rules_android#602 ·
Los mantenedores suelen responder en 6 días
Todos los issues de bazelbuild/rules_android
Issues similares
-
[P2] 生产环境下启动门闩的失败明细不进容器标准输出Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Lincoln-cn/JAiRouter#1473 ·
Los mantenedores suelen responder en 1 día
-
Link not working in the feedback concerning String.format() in exercise 'Tim from Marketing'Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
exercism/java-analyzer#379 ·
-
area: ui bug priority: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
tetsuji16/microProject#1893 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
liberation-data/fornax4j#325 ·
Los mantenedores suelen responder en 1 día
-
[Bug]: FE and Kinesis extraction pipes render flow starting at the centre and scroll the source arm backwardsPosiblemente ocupada @chonkzillaofficial la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
BCCE-team/BuildCraft#85 ·