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

feature request: Invert status #28

Closed
nagisa opened this issue Jan 11, 2019 · 7 comments · Fixed by #53
Closed

feature request: Invert status #28

nagisa opened this issue Jan 11, 2019 · 7 comments · Fixed by #53

Comments

@nagisa
Copy link
Member

nagisa commented Jan 11, 2019

Add ability to look for any change in success status. i.e. not only went from good to bad, but also from bad to good.

@Mark-Simulacrum
Copy link
Member

If I understand you correctly, I think this would probably require something more interesting than a binary search - we need the status to be monotonic (i.e. change only once). Perhaps I'm misunderstanding you though? We certainly can naively see if the status has changed under us and warn/print that...

@nagisa
Copy link
Member Author

nagisa commented Jan 11, 2019

Status changing only once is fine, its just that currently cargo-bisect-rustc requires the start end to always succeed and the end end to always fail.

@nagisa
Copy link
Member Author

nagisa commented Jan 11, 2019

Basically my goal today was to see where a bug was fixed, rather than appeared :)

@kennytm
Copy link
Member

kennytm commented Jan 11, 2019

You could use a script which inverts the execution result.

#!/bin/sh
! cargo check 

@Mark-Simulacrum
Copy link
Member

I think I'd be happy to accept a PR for this change.. not sure I'll get a chance myself in the next few days.

@spastorino
Copy link
Member

spastorino commented Dec 9, 2019

@nagisa I know this is a bit old, trying to get this repo in shape a bit. Is @kennytm suggestion enough? or are you up to provide a PR with your idea?

@nagisa
Copy link
Member Author

nagisa commented Dec 10, 2019

Using a script worked for me and I used the trick more than once since. I think this is a common enough want to implement it in bisect-rustc but I also don't think it is super critical.

pnkfelix added a commit to pnkfelix/cargo-bisect-rustc that referenced this issue Feb 20, 2020
Also added some other variants, to resolve rust-lang#28.

Just to spell it out:

 * --regress=error is the default: an error status (program rejection or
   ICE) is a regression.

 * --regress=success is probably what you want for rust-lang#28, to see where a
   fix was injected.

 * --regress=ice is what you want if you're looking for where an ICE was
   injected.

 * --regress=non-error is what you want if you know the code should be a static
   error, but the bug is causing either ICEs or invalid successes to show up.
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 a pull request may close this issue.

4 participants