-
Notifications
You must be signed in to change notification settings - Fork 67
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
Replace ::Mux.var"***" closure types from stacktraces with a simple ::MuxClosure "type" #140
Conversation
Thanks for looking into this! Could you paste in here an example stack trace with and without this PR? |
There you go: Example stack Before
After
It incorrectly transforms some closure that look like this (::MuxClosure)(app::Dict) to (::MuxClosure)(app::Dict) - but I think that's as far as a regex goes. |
This is awesome! We'll definitely want a simple test for this, just to make sure it doesn't break. |
Also, is it possible to do this without a regex, by inspecting the stackframes directly? |
I'm not sure I understand - can you say more?
Sure, will update he code. |
You call Of course, this might be more work than it's worth. I'm personally fine with the current approach; we can always improve its accuracy in another PR. |
Replaces #140. I rewrote this because I wanted us to correctly match the braces, which isn't practical with Regex.
Replaces #140. I rewrote this because I wanted us to correctly match the braces, which isn't practical with Regex.
Closed in #157. Thanks for suggesting this approach! |
This pr provides a
prettystderrcatch
middleware that removes the unreadable closure type and replaces that with a fancy::MuxClosure
.Also uses the cleaning in the
basiccatch
function.Another approach toward #87 can be to remove the stackframes with ::MuxClosures completely, but this is more invasive.