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

Refactor start and end range regression check fails to Error from panic #48

Conversation

chrissimpkins
Copy link
Member

@chrissimpkins chrissimpkins commented Feb 12, 2020

This PR refactors the panics on start and end date regression checks in the least_satisfying function to failure::Error and adds error handling so that this propagates to the run() function.

The user receives the error message and non-zero exit status code rather than a panic:

From:

verifying the end of the range reproduces the regression
std for x86_64-apple-darwin: 16.39 MB / 16.39 MB [============================] 100.00 % 11.44 MB/s uninstalling nightly-2020-02-03
tested nightly-2020-02-03, got No
thread 'main' panicked at 'the end of the range to test must reproduce the regression', /Users/chris/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-bisect-rustc-0.2.1/src/least_satisfying.rs:34:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

to:

verifying the end of the range reproduces the regression
std for x86_64-apple-darwin: 16.39 MB / 16.39 MB [============================] 100.00 % 13.99 MB/s uninstalling nightly-2020-02-03
tested nightly-2020-02-03, got No
Error: the end of the range to test must reproduce the regression

@chrissimpkins
Copy link
Member Author

Closing in favor of #58 that includes broad support for error handling and implements the changes here.

@chrissimpkins chrissimpkins deleted the bail-not-panic-least-satisfying branch April 7, 2020 02:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants