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
Closed

Bisecting errors against PRs #78

nikomatsakis opened this issue Mar 7, 2018 · 12 comments
Labels
E-help-wanted Call for participation: extra help is wanted E-medium Difficulty: might require some prior knowledge or code reading

Comments

@nikomatsakis
Copy link
Contributor

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
Copy link
Contributor Author

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

@Mark-Simulacrum
Copy link
Member

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
Copy link
Member

mark-i-m commented Mar 7, 2018

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

@mark-i-m mark-i-m mentioned this issue Mar 8, 2018
13 tasks
@est31
Copy link
Member

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
Copy link
Contributor Author

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
Copy link
Member

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
Copy link
Member

mark-i-m commented Mar 9, 2018

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

@ehuss
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
Copy link
Member

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

@ehuss
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
Copy link
Member

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
Copy link
Member

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
Labels
E-help-wanted Call for participation: extra help is wanted E-medium Difficulty: might require some prior knowledge or code reading
Projects
None yet
Development

No branches or pull requests

5 participants