Conversation
e479f36 to
1ce7d42
Compare
orizi
left a comment
There was a problem hiding this comment.
@orizi made 1 comment.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on piotmag769).
crates/cairo-lang-sierra-generator/src/debug_info/function_debug_info.rs line 143 at r1 (raw file):
}; let (_, span, _) = maybe_code_location(db, location)?;
isn't the path required though as part of the data as well?
Code quote:
et (_1ce7d42 to
5466d33
Compare
piotmag769
left a comment
There was a problem hiding this comment.
@piotmag769 made 1 comment.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on orizi).
crates/cairo-lang-sierra-generator/src/debug_info/function_debug_info.rs line 143 at r1 (raw file):
Previously, orizi wrote…
isn't the path required though as part of the data as well?
For the function data, yes. But this function extracts only data for a variable. Changed the code to be more clear.
orizi
left a comment
There was a problem hiding this comment.
@orizi reviewed 1 file and all commit messages, made 1 comment, and resolved 1 discussion.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on piotmag769).
This sanity check actually broke the debug info for snforge test functions since
function_code_spanis a call site in their case, not a function bodyNote
Low Risk
Low risk: small, localized changes to debug-info extraction logic; main impact is different/expanded variable span reporting, which could affect debugger tooling output but not compilation/runtime behavior.
Overview
Fixes Sierra function debug-info extraction so variable-to-source mappings are no longer discarded when the variable definition span falls outside the extracted
function_code_span(e.g., snforge test functions where the span can represent a call site).extract_variables_mappingnow derives variableSourceCodeSpandirectly from the variable’suser_location(usingposition_in_file) and drops the previousmaybe_code_location-based sanity check and the need to thread the function’s file/span into the mapping.Written by Cursor Bugbot for commit 5466d33. This will update automatically on new commits. Configure here.