refactor(stacktrace): Change StackFrame.line from usize to Option<usize>#83
Merged
romtsn merged 2 commits intorz/feat/r8-tests-line-number-handlingfrom Feb 16, 2026
Conversation
loewenheim
approved these changes
Feb 10, 2026
74783ef to
4921149
Compare
Base automatically changed from
rz/feat/r8-tests-invalid-range-normalization
to
rz/feat/r8-tests-line-number-handling
February 16, 2026 09:31
Distinguish "no line info" (None) from "line 0" (Some(0)) in stack frames. This is a prerequisite for correctly handling R8's various no-line mapping semantics where the absence of line information has different behavior than an explicit line 0. - StackFrame::new/with_file wrap line in Some() - StackFrame::with_parameters uses None instead of 0 - parse_frame returns None for missing line, Some(n) for present line - Display omits `:line` suffix when line is None - All call sites updated with unwrap_or(0) to preserve current behavior - All test assertions updated to use Some(N) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
4921149 to
532c271
Compare
f132a33
into
rz/feat/r8-tests-line-number-handling
4 of 6 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
StackFrame.linefromusizetoOption<usize>to distinguish "no line info" (None) from "line 0" (Some(0))unwrap_or(0)to preserve current behavior; no semantic changesTest plan
test_multiple_lines_no_line_number_stacktracenow passes as a bonus (was previously failing)🤖 Generated with Claude Code