Track dbg! calls#293
Conversation
d466ab0 to
7c43d07
Compare
|
In 7c43d07: Rather than feature-gating it, can you add a new trait method Also sorry for the late review -- I assumed from the name that this PR was much bigger than it was! |
7c43d07 to
2806157
Compare
|
Done! Haha no worries, minimised footprint was the goal :) |
|
|
||
| fn is_track_debug_enabled(&self) -> bool { | ||
| // Set flag to test frame decoding in unit tests | ||
| cfg!(test) |
There was a problem hiding this comment.
Not ideal, but I don't have a better idea
There was a problem hiding this comment.
Hehe, I think it's ok. Agree that it looks pretty weird, but the nice thing is that cfg(test) is only ever set within this project, so we don't need to worry about this weirdness somehow being exposed to our dependencies.
There was a problem hiding this comment.
I guess the "right" way to do it is to add a whole nother Tracker type for use in tests. But I think this is fine for now.
This PR extends the
ExecTrackertrait to support tracking debug calls (identity nodes generated bydbg!macro in Simfony). It is enabled by featuredebugto avoid the decoding overhead by default.Ported from https://github.com/uncomputable/simfony-webide/blob/adb60d4e60c0d6b019ea13f64b1a166da3467d8d/src/function.rs#L144
Example of usage: https://github.com/keep-starknet-strange/stark-symphony/blob/37b0a1892c69ea3b0f2d1c8088563e7fae7c3825/simfony-cli/src/tracker.rs#L65
Sample output
