-
Notifications
You must be signed in to change notification settings - Fork 55
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
Link to current nightly #55
Link to current nightly #55
Conversation
r? @spastorino |
This looks slightly wrong to me. The default toolchain could be I was also concerned about removing someone's installed nightly, but it looks like remove_dir_all isn't supposed to follow symlinks (though I'm not sure what behavior is like for hardlinks, I believe rustup link doesn't create those). I guess modulo rust-lang/rust#48504 but hopefully we don't hit that. |
Yeah I just realized this while I was experimenting with this and happened to be making local changes to my (It seems like |
Yes, rustup isn't really ready for scripting today, semi-intentionally. Or so I recall hearing from @kinnison... I think. |
Before, we would just skip attempts to install a current nightly. (And then, we would unconditionally fail the run as documented on issue rust-lang#54, regardless whether of whether the regression was actually visible on that version, due to it not being installed with the name "bisector-nightly-xxx" that we expect.) This commit fixes that. It makes `install` call out to `rustup toolchain link` to link the current rustc (as reported via `rustc --print sysroot`) up to the new "bisector-nightly-xxx" that we expect. (I also refactored the code to construct `DownloadParams`; that refactoring was more relevant in an earlier version of the code that was linking in a different (buggy) way.)
unconditionally. This is a sort of scary thing to do, so I added a safe-guard to double-check that whatever directory we are removing, it is one of the ones starts with "bisector" and thus is something cargo-bisect-rustc is implicitly in charge of.
…: forced installs. Extended safeguard from previous commit to cover that case too.
8ebf631
to
f8f6b6e
Compare
(just forced-push a new version that uses |
thanks @spastorino Co-Authored-By: Santiago Pastorino <spastorino@gmail.com>
You know, a way to definitely avoid this risk is to "just" fully copy the directory tree locally, rather than use a symbolic link. And then the resulting directory structure for the bisector variants would be totally uniform, and it would also avoid the risk (when using (it would also be wasteful of disk space, of course... but that might be a micro-optimization for something like this.) Its at least something to consider, though I would be happy just landing this PR as is, rather than bikeshedding this question. |
Fix code that was trying reuse an already installed nightly, by making
install
call out torustup toolchain link
to link the currently installed nightly up to the new "bisector-nightly-xxx" that we expect.Fix #54