rust-lang / cargo-bisect-rustc

Bisects rustc, either nightlies or CI artifacts
https://rust-lang.github.io/cargo-bisect-rustc/
Apache License 2.0
177 stars 55 forks source link

Use dates for git tags if possible #167

Closed ehuss closed 2 years ago

ehuss commented 2 years ago

Support for using git tags in --start and --end was added in #147. cargo-bisect-rustc translates those to hashes. However, CI commits or only kept for a few months (167 days?). That means you can't go back very far using git tags. I think it would be better if it translated those tags into dates, which go back forever, allowing bisecting of older releases.

If the range is within the last 167 days, cargo-bisect-rustc will automatically switch to CI commits once it has found the specific nightly.

Translating a commit to a nightly date isn't straightforward. However, I think it can use a heuristic of assuming that the commit exists in the nightly of the next day after the commit. That's not always true, but I think should be close enough.