Bug: ProguardMapping is not queryable nor deterministically generated

Open
#194 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 6 days

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
android, java
Domain
build-system

Research direction

Start by tracing the implicit target mentioned in rules_android and reproduce the clean, remote-cache build described in the issue. Check how the proguard_mapping output is declared and how bazel cquery //<app>:<target>_RESOURCES_DO_NOT_USE --output files reports it; done means the mapping is reproducible and queryable after the rebuild.

Written by the indexing model from the issue text.

Description

There is a bug in rules_android where the proguard_mapping file may not be reproduced. The root cause is that the proguard mapping file is not being explicitly declared as the output of the implicit target.

Reproduction steps:
  1. Build a Bazel binary that enables proguard mapping, enables disk, and remote cache
  2. Run bazel clean --expunge
  3. Rebuild the Bazel binary.
  4. Observe the proguard mapping is not found at bazel-out/xplat-fastbuild/bin//_RESOURCES_DO_NOT_USE_proguard.map

Furthermore, there is no way to actually query this file. This is problematic because we will need to upload the obfuscated mapping when debugging/deobfuscating builds.

bazel cquery //:_RESOURCES_DO_NOT_USE --output files

Dominant language
Java
Stars
205
Forks
113
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from bazelbuild/rules_android

All issues in bazelbuild/rules_android

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.