feat(r8): Make startline, endline and original_startline optional#84
Merged
romtsn merged 5 commits intorz/feat/r8-tests-line-number-handlingfrom Feb 16, 2026
Merged
Conversation
romtsn
commented
Feb 9, 2026
loewenheim
reviewed
Feb 10, 2026
Contributor
loewenheim
left a comment
There was a problem hiding this comment.
If I read this right, has_minified_range is equivalent to startline and endline existing/being valid, and has_line_mapping is equivalent to original_startline existing/being valid. Is that correct? If it is, it would probably be better to make those fields optional.
169af30 to
c22e0f9
Compare
74783ef to
4921149
Compare
Member
Author
|
Switched to Optional startline, endline and original_startline to make it cleaner and more idiomatic than the boolean flags |
loewenheim
approved these changes
Feb 13, 2026
4921149 to
532c271
Compare
Base automatically changed from
rz/fix/r8-tests-option-line-type
to
rz/feat/r8-tests-line-number-handling
February 16, 2026 10:22
14e735b to
b5f6e46
Compare
…bers Track whether a mapping line had an explicit minified range prefix (e.g. `0:0:` or `1:5:`) and whether it had any line mapping at all. This metadata is needed for correctly resolving no-line entries in subsequent changes. - LineMapping: add has_minified_range field - Member (builder): add has_minified_range and has_line_mapping fields - MemberMapping (mapper): propagate both fields - cache Member (raw): replace _reserved bytes with the two new flags - Bump cache version 4 → 5 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace has_minified_range and has_line_mapping bools with Option<usize> fields on builder::Member and mapper::MemberMapping. startline/endline are now None when no minified range prefix was present, and original_startline is None when no line mapping existed. In cache/raw.rs, use u32::MAX sentinel for absent values and add Option-returning accessor methods (startline(), endline(), original_startline()) replacing the removed bool accessors. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Revert cache version bump (4 stays, struct layout unchanged) - Make LineMapping.startline/endline Optional, remove has_minified_range - Extract startline/endline variables in cache find_members_and_rules Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
b5f6e46 to
f99aade
Compare
92bba06
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
startline,endline, andoriginal_startlinefieldsOption-typed on bothMember(builder) andMemberMapping(mapper) structshas_minified_range,has_line_mapping) — presence/absence is now encoded directly:startline.is_some()means a minified range was present,original_startline.is_some()means a line mapping existed
u32::MAXis used as a sentinel for absent values (viaNONE_VALUEconstant)StackFrame.linefromusizetoOption<usize>to distinguish "no line provided" from "line 0"Test plan