-
Notifications
You must be signed in to change notification settings - Fork 564
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changed debug::print to print hex values #3377
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed all commit messages.
Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion (waiting on @yuvalsw)
crates/cairo-lang-runner/src/casm_run/mod.rs
line 1737 at r1 (raw file):
} else { println!("[DEBUG]\t{:<31}\t(raw: 0x{:X}) ", ' ', value.to_bigint()); }
if the second one cries (as it has for me for some reason)
just extract let raw = value.to_bigint();
Suggestion:
let value = vm.get_integer(curr)?;
if let Some(shortstring) = as_cairo_short_string(&value) {
println!("[DEBUG]\t{shortstring: <31}\t(raw: {:#x})", value.to_bigint());
} else {
println!("[DEBUG]\t{:<31}\t(raw: {:#x}) ", ' ', value.to_bigint());
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 3 of 3 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @yuvalsw)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 2 of 3 files reviewed, 1 unresolved discussion (waiting on @orizi)
crates/cairo-lang-runner/src/casm_run/mod.rs
line 1737 at r1 (raw file):
Previously, orizi wrote…
if the second one cries (as it has for me for some reason)
just extractlet raw = value.to_bigint();
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @yuvalsw)
Is there a way to continue printing values as decimals following this update? In our case decimals are more relevant than hex for debugging |
Hey, please see this: |
What about printing decimal values rather than short strings? Is there a different print method to support this? |
This change is