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

fix getting working commit with missing nightlies #320

Merged
merged 2 commits into from
Feb 28, 2024

Conversation

lukas-code
Copy link
Member

The previous implementation assumed that the most recent working nightly is from one day before the regressed nightly. But that's sometimes not the case if there are missing nightly versions. This PR fixes getting the working nightly version by trying the previous dates until we find one that actually has a nightly.

Test Case

code:

trait Foo {
    fn foo() {
        pub struct Bar;
        impl Bar {
            pub fn bar() {}
        }
    }
}

run:

cargo bisect-rustc --start 2024-01-01 --end 2024-01-04

output before:

fetching https://static.rust-lang.org/dist/2024-01-03/channel-rust-nightly-git-commit-hash.txt
ERROR: Tarball not found at https://static.rust-lang.org/dist/2024-01-03/channel-rust-nightly-git-commit-hash.txt

output after:

fetching https://static.rust-lang.org/dist/2024-01-03/channel-rust-nightly-git-commit-hash.txt
missing nightly for 2024-01-03
fetching https://static.rust-lang.org/dist/2024-01-02/channel-rust-nightly-git-commit-hash.txt
missing nightly for 2024-01-02
fetching https://static.rust-lang.org/dist/2024-01-01/channel-rust-nightly-git-commit-hash.txt
nightly manifest 2024-01-01: 40 B / 40 B [==============] 100.00 % 1.02 MB/s
converted 2024-01-01 to e51e98dde6a60637b6a71b8105245b629ac3fe77

fixes #51

Lukas Markeffsky added 2 commits February 26, 2024 15:31
```
warning: the item `reqwest` is imported redundantly
 --> src/github.rs:3:15
  |
3 | use reqwest::{self, blocking::Client, blocking::Response};
  |               ^^^^ the item `reqwest` is already defined here
  |
  = note: `#[warn(unused_imports)]` on by default
```
Copy link
Collaborator

@ehuss ehuss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ehuss ehuss merged commit 9411af3 into rust-lang:master Feb 28, 2024
4 checks passed
@lukas-code lukas-code deleted the missing-nightly branch February 28, 2024 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants