-
Notifications
You must be signed in to change notification settings - Fork 44
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
Improve backtrace looks and performance #249
Conversation
Instead of discarding all frames before `buttercup--debugger', use the base argument of `backtrace-frame' to start at the frame after `buttercup--debugger'.
@alphapapa @doublep @jcs090218 |
Hi Ola, Thanks for the heads-up. I just did a quick test on the |
Thank you for notifying me. I've done a quick test, and it is working fine. :) I've opened a PR in #250 to test downstream Eask and see if it works. This could make you more confident about the changes. 🤔 |
No tests in Eldev seem to broken with these changes. However, it looks like the backtraces are not cut by Buttercup itself anymore (i.e. this is not because of Eldev). After intentionally corrupting one test, this is what I got in the branch (just ran
For comparison, in
Also, the branch doesn't seem to add any new tests, which is suspicious for a big change. |
@doublep , how can I recreate that? |
|
I think that is because of buttercup nesting itself. It fails to find the correct bounds of the backtrace because there are two sets of them. While this is annoying, it feels less important than normal use. If you can recreate it with another package I would really like to know about it.
instead of
|
Hmm, but that specific test is not nested. I'll have to look further. |
I originally noticed it with |
I think I'm on to something now. |
c0616be
to
bb77c5d
Compare
This will limit the backtrace for errors signalled from within a wrapped expression. There is still a set of other conditions that have to be handled in buttercup--backtrace.
There is no reason to collect backtraces for expect form where the matcher detects a mismatch. It's all buttercup infrastructure at that point.
The first uninteresting frame is identified by a new `buttercup--stackframe-marker' in a let statement: (let ((buttercup--stackframe-marker 1)) ... This let-form is added to the buttercup-with-converted-ert-signals macro, not because it has anything to do with ert signal conversion, but because it is the last wrapper around the spec code given by the user.
The "should not generate backtraces for skipped specs" had a lot of similarties to the two specs in the "should not be collected or printed for" suite. Move it into that suite, not only for shared code but also because they belong together.
Fake the last frame to show the matchers name.
Recent changes in the backtrace code has made `buttercup--mark-stackframe' redundant. Remove all uses and mentions in code and tests.
Newer and even more improved. |
No comments for more than a week, merging this now. |
Make the backtrace prints better - less unwanted output - with a lot better performance.
Fixes #247
Fixes #220