Skip to content

feat(proguard): Bump proguard to 5.10.1 and filter synthesized frames#1896

Merged
romtsn merged 4 commits intomasterfrom
rz/feat/proguard-510
Mar 10, 2026
Merged

feat(proguard): Bump proguard to 5.10.1 and filter synthesized frames#1896
romtsn merged 4 commits intomasterfrom
rz/feat/proguard-510

Conversation

@romtsn
Copy link
Copy Markdown
Member

@romtsn romtsn commented Mar 9, 2026

Summary

  • Bumps proguard crate from 5.9.0 to 5.10.0
  • Filters out compiler-synthesized frames (e.g. lambda bridges) from remapped stacktraces, matching R8 retrace behavior
  • Handles StackFrame::line() now returning Option<usize> instead of usize
  • Fixes incomplete test mapping for outline callsite position entries
  • Updates integration test snapshots for new filename/abs_path fields

Currently blocked by getsentry/rust-proguard#88 which needs to be shipped in a patch release and bumped here to make the CI pass

Test plan

  • Unit tests updated and passing
  • Integration test snapshots updated
  • Verify CI passes

🤖 Generated with Claude Code

- Handle `StackFrame::line()` returning `Option<usize>` instead of `usize`
- Filter out compiler-synthesized frames (e.g. lambda bridges) from
  remapped stacktraces, matching R8 retrace behavior
- Only filter synthesized frames when the original frame had a line
  number, matching a retrace quirk where no-line-number resolution
  skips range-level synthesized annotations
- Fix incomplete test mapping in `remap_filename_inlined` to include
  outline callsite position entries
- Update integration test snapshots for new filename/abs_path fields

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Autofix Details

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Symbolication stats count frames later dropped by filtering
    • Moved symbolicated_frames counting to after synthesized-frame filtering so only retained frames are counted.

Create PR

Or push these changes by commenting:

@cursor push 07be777269
Preview (07be777269)
diff --git a/crates/symbolicator-proguard/src/symbolication.rs b/crates/symbolicator-proguard/src/symbolication.rs
--- a/crates/symbolicator-proguard/src/symbolication.rs
+++ b/crates/symbolicator-proguard/src/symbolication.rs
@@ -326,16 +326,11 @@
                     {
                         mapped_frame.in_app = Some(true);
                     }
-
-                    // Also count the frames as symbolicated at this point
-                    *stats
-                        .symbolicated_frames
-                        .entry(mapped_frame.platform.clone())
-                        .or_default() += 1;
                 }
             }
 
             // If all else fails, just return the original frame.
+            let was_symbolicated = mapped_result.is_some();
             let mut frames = mapped_result.unwrap_or_else(|| {
                 *stats
                     .unsymbolicated_frames
@@ -365,6 +360,16 @@
                 }
             }
 
+            // Count only frames that remain after filtering and were actually symbolicated
+            if was_symbolicated {
+                for mapped_frame in &frames {
+                    *stats
+                        .symbolicated_frames
+                        .entry(mapped_frame.platform.clone())
+                        .or_default() += 1;
+                }
+            }
+
             remapped_frames.extend(frames);
         }
This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.

Filter out synthesized frames before incrementing symbolicated_frames
so that dropped frames are not overcounted in the num_frames metric.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

romtsn added a commit to getsentry/rust-proguard that referenced this pull request Mar 10, 2026
## Summary
- When a frame has no line number and there are no base entries
(endline==0), detect if the first range group forms an inline chain
(multiple entries sharing the same startline/endline) and resolve each
entry with its proper original line instead of emitting all entries with
line 0
- This matches retrace's `allRangesForLine(0, true)` behavior, which
picks the first range containing line 0 and returns all entries in that
group
- Applied to both `ProguardCache` and `ProguardMapper`

Fixes CI in getsentry/symbolicator#1896 where
the regression has been discovered

## Test plan
- [ ] Existing tests pass
- [ ] Verify with mapping files that contain inline groups without base
entries

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
@romtsn romtsn changed the title feat(proguard): Bump proguard to 5.10.0 and filter synthesized frames feat(proguard): Bump proguard to 5.10.1 and filter synthesized frames Mar 10, 2026
Bumps proguard to 5.10.1 which contains a CI fix. Also documents the
intentional line-0 fallback behavior that matches retrace's
allRangesForLine(0, true) resolution path.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@romtsn romtsn force-pushed the rz/feat/proguard-510 branch from 8aa2054 to a03ac4a Compare March 10, 2026 10:56
@romtsn romtsn enabled auto-merge (squash) March 10, 2026 11:06
@romtsn romtsn merged commit 8a41603 into master Mar 10, 2026
24 checks passed
@romtsn romtsn deleted the rz/feat/proguard-510 branch March 10, 2026 11:16
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.

2 participants