Skip to content
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

Add backtraces to test errors #5771

Merged
merged 2 commits into from Mar 28, 2019
Merged

Add backtraces to test errors #5771

merged 2 commits into from Mar 28, 2019

Conversation

faho
Copy link
Member

@faho faho commented Mar 26, 2019

Description

As you know, test has some sharp edges.

And worst of all, whenever you have hit one of them in a large script, it's hard to find because it'll only tell you "Missing argument at index 2" or "\tThe argument is invalid: 'w'".

This adds a backtrace to that, like our other builtins, so you can find the darn bugger.

TODOs:

  • Changes to fish usage are reflected in user documentation/manpages.
  • Tests have been added for regressions fixed
  • User-visible changes noted in CHANGELOG.md

This is a remainder from when we used to speak of "eval errors".
`test` is a common source of problems, and with the current system
they can be quite hard to find.

So we print a backtrace with line numbers and all.
@faho faho added this to the fish 3.1.0 milestone Mar 26, 2019
@faho faho changed the title Test backtraces Add backtraces to test errors Mar 27, 2019
@ridiculousfish
Copy link
Member

Sweet, makes sense to me and changes look good!

@faho faho merged commit 785945c into fish-shell:master Mar 28, 2019
@faho faho deleted the test-backtraces branch April 1, 2019 14:07
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants