No more nightly updates that break clippy. No more manually cargo install clippy. You can finally get the latest in annoying/helpful static analyses on a nightly near you in just 3 easy steps:
rustup update(yes this is very important, no you can’t skip it, yes rustup self update && rustup update nightly is fine, too)
rustup component add clippy-preview
cargo clippy
Note that if you cargo uninstall clippy afterwards you will break your system and need to run rustup self update again to fix it.
Please spread the word to all those who (understandibly) didn’t want to use a tool that breaks every 10 days and then test it to your heart’s desires. Report any issues you have at https://github.com/rust-lang-nursery/rust-clippy/issues/new
IIRC, rustfmt-preview existed as a component for a few release cycles before its availability was actually announced in 1.24, still in preview. Do you know what the plans are for clippy in this regard?
(This will influence when I’ll try to start packaging clippy-preview in Fedora.)
I guess I’m asking if it will just happen to land on stable 1.29, or if it will be announced in 1.29 and have some promise of remaining until its non-preview graduation. IOW, I don’t want to start packaging it in 1.29 if it might disappear in 1.30+ for whatever reason.
Big thanks to @nrc for helping us plan this and push for this, @kennytm and @alexcrichton who advised us with the final steps with the integration, and @yaahc for helping with the implementation!
This has been something that we’ve been hoping for for years now, and it’s great to see it finally in a usable state!
EDIT: Its working, just needs to run rustup self update and make sure https://static.rust-lang.org/rustup/release-stable.toml is not cached by your proxy…
After rustup component add clippy-preview will rustup install clippy after a rustup update? I was told that this works, but I just did a rustup update and previously working rustfmt is now broken again until I do rustup component add rustfmt-preview. It’d be nice to not add these components every time I update the toolchain.
Maybe next release try rustup --verbose update | tee log and open a ticket with the log if it fails again (although, that’s very verbose and doesn’t seem like it includes much useful extra info).
FYI I’m suspecting this somehow broke my builds. I pin the version of nightly and clippy that I use and yet my clippy jobs have recently started failing. I’m unsure if this is expected or not.
What seems to be happening is that rustup has provided a cargo-clippy binary already, so the cache-friendly install of clippy sees that binary there and doesn’t install from crates.io. Then trying to use it obviously fails because the binary just says that the current toolchain doesn’t have clippy.
A little annoying, but worth it to bring clippy onto the train, I think.
ooops. We had a sanity check for helping ppl pick the right rustc version. That check complains about being built with the beta compiler. https://github.com/rust-lang/rust/pull/53199 should fix it.