stop error backtrace at framework#59
Merged
joeldrapper merged 1 commit intoyippee-fun:mainfrom Feb 28, 2025
pushcx:backtrace_flag
Merged
stop error backtrace at framework#59joeldrapper merged 1 commit intoyippee-fun:mainfrom pushcx:backtrace_flag
joeldrapper merged 1 commit intoyippee-fun:mainfrom
pushcx:backtrace_flag
Conversation
| exit | ||
| end | ||
|
|
||
| parser.on("-b", "--backtrace", "Backtrace past test into Quickdraw") do |it| |
There was a problem hiding this comment.
I confess that I do not immediately grok this sentence.
Collaborator
There was a problem hiding this comment.
It means the backtrace should go past the tests and into the framework code.
Contributor
Author
There was a problem hiding this comment.
I was using backtrace as a verb. Maybe "Continue backtrace past test into Quickdraw" would be more obvious?
This was referenced Feb 28, 2025
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As a Quickdraw user, it is not at all useful to backtrace into the framework. That's just distraction I have to read around. I made it an option because I've managed to eventually get every testing tool to throw an exception eventually.
Maybe it's worth a teensy risk to drop the option and write this something like:
take_while { |it| error["backtrace"].first.include?("Quickdraw::") || !it.include?('Quickdraw::Runner') }so that full backtrace only prints when the exception originates in Quickdraw.I originally opened this code to fix the apparent bug with the increasing indentation, but it looks like that's an intentional style choice that I just strongly disagree with.
(Speaking of which, this is the first time I have seen Ruby indented with tabs. I feel like offering a feature PR permits one small piece of bikeshedding. Or more productively: I have gotten a lot of peace of mind by using standardrb, disabling
Lint/UselessAssignment(breaks things mid-refactor) and never thinking about style.)