Skip to content

feat(r8-tests): Add R8 ambiguous tests#71

Merged
romtsn merged 5 commits intomasterfrom
rz/feat/r8-tests-ambiguous
Jan 28, 2026
Merged

feat(r8-tests): Add R8 ambiguous tests#71
romtsn merged 5 commits intomasterfrom
rz/feat/r8-tests-ambiguous

Conversation

@romtsn
Copy link
Copy Markdown
Member

@romtsn romtsn commented Dec 19, 2025

Part of #40

There are failing tests in this PR that need fixes in the mapper/cache itself, so I will open a follow-up PR that targets this branch.

R8 Retrace Test Coverage

  • Inlining (13 tests) - inline frames, line numbers, source files, rewriteFrame rules
  • Ambiguous Methods (21 tests) - multiple methods → same obfuscated name, alternatives
  • Outlines (4 tests) - outline callsites, nested outlines, inline-in-outline
  • Synthetic/Lambda (3 tests) - lambda methods, synthetic bridges
  • Source File Edge Cases (7 tests) - colons, unicode, multiple dots, synthesized names
  • Line Number Handling (10 tests) - spans, preambles, invalid ranges, missing lines
  • Exception Handling (6 tests) - obfuscated exceptions, suppressed, circular refs
  • Method Overloading (4 tests) - overloads with/without ranges
  • Special Formats (4 tests) - Java 9+ modules, logcat format, auto-detect

@romtsn romtsn requested a review from loewenheim December 19, 2025 16:26
Comment thread tests/r8-ambiguous.rs
Comment thread tests/r8-ambiguous.rs
Comment thread tests/r8-ambiguous.rs
@romtsn romtsn requested a review from loewenheim December 23, 2025 13:23
@romtsn
Copy link
Copy Markdown
Member Author

romtsn commented Dec 23, 2025

@loewenheim I've updated tests to match the exact expected output from retrace, and have a couple of questions that we need to make a decision on, hence re-requested a review

@loewenheim
Copy link
Copy Markdown
Contributor

I would honestly not support these alternative stacktraces for now—I don't understand how they work and can't see how we would consume them.

Comment thread tests/r8-ambiguous.NOTES.md
Comment thread tests/r8-ambiguous.NOTES.md
Comment thread tests/r8-ambiguous.NOTES.md
Comment thread tests/r8-ambiguous.NOTES.md
Comment thread tests/r8-ambiguous.NOTES.md
Comment thread tests/r8-ambiguous.NOTES.md
- Improved stacktrace parsing to handle frames that omit a line number
(e.g. (Unknown), (Unknown Source), (Foo.java)) by treating them as line
0 so they can be retraced.
- Enhanced retracing behavior for unknown-line frames:
- Prefer base (no-line) mappings when the stacktrace frame has no line
info.
- Still prefer line-specific mappings when a concrete line is present
(skipping 0:0 / base entries appropriately).
- Added best-effort class remapping even when the method name isn’t
mapped (replicates symbolicator behaviour -- we can probably ditch it
from symbolicator once this is shipped)
- Aligned cache behavior with mapper behavior:
- Cache serialization no longer drops base/no-line member mappings
(instead, we check it during remapping)
- Cache remapping now mirrors mapper rules for unknown-line frames
(including deduplication)

The tests in #71 should pass with this PR
@romtsn romtsn merged commit efdfbb2 into master Jan 28, 2026
7 checks passed
@romtsn romtsn deleted the rz/feat/r8-tests-ambiguous branch January 28, 2026 17:03
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