Skip to content

fix(mapping): Parse Compose mappings with flexible indentation#93

Merged
romtsn merged 2 commits intomasterfrom
rz/fix/compose-stacktrace-indentation
Apr 21, 2026
Merged

fix(mapping): Parse Compose mappings with flexible indentation#93
romtsn merged 2 commits intomasterfrom
rz/fix/compose-stacktrace-indentation

Conversation

@romtsn
Copy link
Copy Markdown
Member

@romtsn romtsn commented Apr 20, 2026

Parse Compose mappings with flexible indentation

ComposeStackTrace -> $$compose: sections generated by recent Android builds use two-space member indentation. The Compose compiler emits those entries with two leading spaces in https://github.com/JetBrains/kotlin/blob/effb244358aec74b7fa752d70a1055b4ea2f3e57/plugins/compose/group-mapping/src/main/kotlin/androidx/compose/compiler/mapping/ComposeMapping.kt#L54, which does not follow the ProGuard spec for member lines. As a result, those entries were dropped during cache generation, leaving symbolication able to remap $$compose to ComposeStackTrace but not to the original methods.

I already filed https://issuetracker.google.com/issues/504284805, but we still need to fix this on our side because there are existing broken mappings in the wild that we need to support. This changes the parser to accept indented member lines and adds focused mapper and cache regressions for the raw Compose stacktrace shape.

Refs getsentry/sentry-android-gradle-plugin#1065

Accept indented member lines instead of requiring exactly four spaces so raw ComposeStackTrace -> 98418compose blocks parse correctly.

Bump the proguard cache format version so existing caches built from truncated Compose mappings are recalculated with the fixed parser.

Co-Authored-By: Codex <noreply@openai.com>
@romtsn romtsn marked this pull request as ready for review April 20, 2026 08:24
@romtsn romtsn requested a review from a team as a code owner April 20, 2026 08:24
Comment thread src/cache/raw.rs Outdated
@Dav1dde
Copy link
Copy Markdown
Member

Dav1dde commented Apr 20, 2026

Kotlin fix: JetBrains/kotlin#5898

Leave the cache format version alone in rust-proguard because the parser compatibility fix does not change the serialized cache layout.

Cache invalidation for existing symbolicator caches will happen on the consumer side instead.

Co-Authored-By: Codex <noreply@openai.com>
@romtsn romtsn enabled auto-merge (squash) April 21, 2026 09:29
@romtsn romtsn merged commit 4f8317b into master Apr 21, 2026
10 checks passed
@romtsn romtsn deleted the rz/fix/compose-stacktrace-indentation branch April 21, 2026 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants