Commit 4f8317b
fix(mapping): Parse Compose mappings with flexible indentation (#93)
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
---------
Co-authored-by: Codex <noreply@openai.com>1 parent 9922a41 commit 4f8317b
2 files changed
Lines changed: 66 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
| 164 | + | |
171 | 165 | | |
172 | 166 | | |
173 | 167 | | |
| |||
505 | 499 | | |
506 | 500 | | |
507 | 501 | | |
508 | | - | |
| 502 | + | |
509 | 503 | | |
510 | 504 | | |
511 | 505 | | |
| |||
568 | 562 | | |
569 | 563 | | |
570 | 564 | | |
571 | | - | |
| 565 | + | |
572 | 566 | | |
573 | 567 | | |
574 | 568 | | |
| |||
1063 | 1057 | | |
1064 | 1058 | | |
1065 | 1059 | | |
1066 | | - | |
1067 | | - | |
| 1060 | + | |
1068 | 1061 | | |
1069 | 1062 | | |
1070 | 1063 | | |
1071 | 1064 | | |
1072 | | - | |
1073 | | - | |
1074 | | - | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
1075 | 1069 | | |
1076 | 1070 | | |
1077 | 1071 | | |
| |||
1145 | 1139 | | |
1146 | 1140 | | |
1147 | 1141 | | |
1148 | | - | |
1149 | | - | |
1150 | | - | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
1151 | 1146 | | |
1152 | 1147 | | |
1153 | 1148 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
0 commit comments