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

Bisecting errors against PRs #78

Closed
nikomatsakis opened this Issue Mar 7, 2018 · 12 comments

Comments

Projects
None yet
5 participants
@nikomatsakis
Copy link
Contributor

nikomatsakis commented Mar 7, 2018

One of the best way of figuring out the cause of a regression is bisecting against the PRs that have landed recently. There are a number of folks (cc'd below) who do this from time to time -- I'm not really sure what wizardry they use to do it, but I'd love to see it documented!

cc @Mark-Simulacrum, @kennytm, @TimNN, @est31

@nikomatsakis

This comment has been minimized.

Copy link
Contributor Author

nikomatsakis commented Mar 7, 2018

(Is this on topic for this guide? Maybe too far astray? Maybe better for forge? I'm not really sure.)

@Mark-Simulacrum

This comment has been minimized.

Copy link
Member

Mark-Simulacrum commented Mar 7, 2018

The current (possibly broken, I haven't used it in a while) tooling that I know of to do this is https://github.com/Mark-Simulacrum/bisect-rust. However, I have had some thoughts about changing to just using normal git bisect in a rust-lang/rust checkout but instead of building downloading CI artifacts -- this should make the implementation considerably smaller. I hope to investigate something like this over the next few weeks, or maybe at all hands. I'd like for us to have an easy-to-use method that does bisection, and I don't think bisect-rust quite does that today.

@mark-i-m

This comment has been minimized.

Copy link
Collaborator

mark-i-m commented Mar 7, 2018

I think this could go in the "debugging the compiler" section

@mark-i-m mark-i-m referenced this issue Mar 8, 2018

Closed

"Debugging the compiler" #11

13 of 13 tasks complete
@est31

This comment has been minimized.

Copy link

est31 commented Mar 8, 2018

Usually it looks like this for me:

  1. reproduce the regression by using rustup to check two nightly versions around the regression date
  2. use those two nightlies as boundaries for a bisect-rust search
@nikomatsakis

This comment has been minimized.

Copy link
Contributor Author

nikomatsakis commented Mar 8, 2018

While we're talking about tools, it'd be nice for the same tool to support nightlies too (and, in an ideal world, building from source).

@est31

This comment has been minimized.

Copy link

est31 commented Mar 8, 2018

I've never built from source in my bisection work. I've always pinged the most suspicious looking person and then left it to them to nail stuff down further :). But yeah support for nightlies as well would be great (as we delete older builds now)

@mark-i-m

This comment has been minimized.

Copy link
Collaborator

mark-i-m commented Mar 9, 2018

@est31 Would you mind adding this to the "Debugging the compiler" chapter?

@ehuss

This comment has been minimized.

Copy link
Contributor

ehuss commented Oct 16, 2018

I've written a tutorial on how to bisect PR's here: https://github.com/rust-lang-nursery/cargo-bisect-rustc/blob/master/TUTORIAL.md

@mark-i-m

This comment has been minimized.

Copy link
Collaborator

mark-i-m commented Oct 20, 2018

@ehuss Great :) Are you looking to move it to the book?

@ehuss

This comment has been minimized.

Copy link
Contributor

ehuss commented Oct 21, 2018

That's up to @Mark-Simulacrum. I would think it will be easier to maintain in its own repo, in case things change. Perhaps a small paragraph directing people to the tool would be sufficient? Maybe something like this in the debugging chapter:

Narrowing Regressions

The cargo-bisect-rustc tool can be used as a quick and easy way to find exactly which PR caused a change in rustc behavior. It automatically downloads rustc PR artifacts and tests them against a project you provide until it finds the regression. You can then look at the PR to get more context on why it was changed. See the tutorial on how to use it.

@Mark-Simulacrum

This comment has been minimized.

Copy link
Member

Mark-Simulacrum commented Oct 21, 2018

I'm happy with anything! No Rust team currently maintains cargo-bisect-rustc and I myself only have time to review pull requests currently but I think we can link to it despite both of these.

Generally linking the tutorial is I think a better approach so that it stays more up to date, though.

@mark-i-m

This comment has been minimized.

Copy link
Collaborator

mark-i-m commented Oct 22, 2018

opened #216

let me know what you think

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.