Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
216c5eb
feat(r8-tests): Add R8 ambiguous tests
romtsn Dec 19, 2025
7ae46d0
Update tests
romtsn Dec 23, 2025
1deef0a
Change expected of test_ambiguous_missing_line_stacktrace
romtsn Dec 23, 2025
558ed43
fix(r8-tests): Correctly handle no-line mappings
romtsn Dec 23, 2025
59a8dd7
Remove import
romtsn Dec 23, 2025
cf3f732
Preserve input lineno when no mapping is available
romtsn Dec 23, 2025
147a43e
feat(r8-tests): Add R8 synthetic tests
romtsn Dec 23, 2025
7800a1f
feat(r8-tests): Add R8 source file tests
romtsn Dec 23, 2025
6989e38
Fix fixtures
romtsn Jan 8, 2026
e40221f
Add MD file explaining failures
romtsn Jan 8, 2026
20a5bee
feat(r8-tests): Add R8 line number handling tests
romtsn Jan 19, 2026
3ab9f46
Fix formatting
romtsn Jan 19, 2026
20d7b62
Add MD file explaining failures
romtsn Jan 20, 2026
e44baf3
Merge branch 'master' into rz/feat/r8-tests-synthetic
romtsn Jan 28, 2026
a9125eb
Remove r8-ambiguous.NOTES
romtsn Jan 28, 2026
c2fdcab
Merge branch 'rz/feat/r8-tests-synthetic' into rz/feat/r8-tests-sourc…
romtsn Jan 28, 2026
a045327
fix(r8-tests): Fix no-line original line preservation for source file…
romtsn Jan 28, 2026
365a009
Merge branch 'rz/fix/r8-tests-source-file-no-line' into rz/feat/r8-te…
romtsn Jan 28, 2026
764b7f4
fix(r8-tests): Fix no-line original line preservation for source file…
romtsn Jan 29, 2026
a97412f
Drop r8-synthetic
romtsn Jan 29, 2026
462616e
Merge branch 'rz/feat/r8-tests-source-files' into rz/feat/r8-tests-li…
romtsn Jan 30, 2026
ca666d2
Merge branch 'master' into rz/feat/r8-tests-line-number-handling
romtsn Jan 30, 2026
7916939
fix(r8-tests): Normalize inverted line ranges in mapping parser (#82)
romtsn Feb 16, 2026
f132a33
refactor(stacktrace): Change StackFrame.line from usize to Option<usi…
romtsn Feb 16, 2026
92bba06
feat(r8): Make startline, endline and original_startline optional (#84)
romtsn Feb 16, 2026
0a53eb0
refactor(r8): Replace no-line resolution with base entry grouping (#85)
romtsn Feb 16, 2026
fbb94bf
feat(r8): Add line span expansion and outside-range fallback (#86)
romtsn Feb 16, 2026
a346b38
feat(r8): Sort ambiguous no-range entries alphabetically (#87)
romtsn Feb 16, 2026
b7c96b5
chore: Remove r8-line-number-handling.NOTES.md
romtsn Feb 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 31 additions & 20 deletions src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,12 @@ pub(crate) struct RewriteRule<'s> {
pub(crate) struct Member<'s> {
/// The method the member refers to.
pub(crate) method: MethodKey<'s>,
/// The obfuscated/minified start line.
pub(crate) startline: usize,
/// The obfuscated/minified end line.
pub(crate) endline: usize,
/// The original start line.
pub(crate) original_startline: usize,
/// The obfuscated/minified start line, `None` when no minified range prefix was present.
pub(crate) startline: Option<usize>,
/// The obfuscated/minified end line, `None` when no minified range prefix was present.
pub(crate) endline: Option<usize>,
/// The original start line, `None` when no line mapping was present.
pub(crate) original_startline: Option<usize>,
/// The original end line.
pub(crate) original_endline: Option<usize>,
/// Optional outline callsite positions map attached to this member.
Expand Down Expand Up @@ -291,20 +291,31 @@ impl<'s> ParsedProguardMapping<'s> {
} else {
None
};
// in case the mapping has no line records, we use `0` here.
let (startline, endline) =
line_mapping.as_ref().map_or((0, 0), |line_mapping| {
(line_mapping.startline, line_mapping.endline)
});
let (original_startline, original_endline) =
line_mapping.map_or((0, None), |line_mapping| {
match line_mapping.original_startline {
Some(original_startline) => {
(original_startline, line_mapping.original_endline)
}
None => (line_mapping.startline, Some(line_mapping.endline)),
}
});
let (mut startline, mut endline) = match line_mapping.as_ref() {
Some(lm) => (lm.startline, lm.endline),
None => (None, None),
};
let (mut original_startline, mut original_endline) = match line_mapping {
None => (None, None),
Some(lm) => match lm.original_startline {
Some(os) => (Some(os), lm.original_endline),
None => (startline, endline),
},
};

// Normalize inverted ranges independently.
if let (Some(s), Some(e)) = (startline, endline) {
if s > e {
startline = Some(e);
endline = Some(s);
}
}
if let (Some(os), Some(oe)) = (original_startline, original_endline) {
if os > oe {
original_startline = Some(oe);
original_endline = Some(os);
}
}

let Some((current_class_obfuscated, current_class_original)) =
current_class_name
Expand Down
Loading
Loading