Rustfmt and clippy are unavailable in nightly

I have updated my local stable and nightly toolchains to the latest version.
rustup component add rustfmt and rustup component add clippy both work in stable, which is great.
But I found that I cannot install rustfmt and clippy in nightly, I tried reinstall the nightly toolchain, and try install rustfmt and clippy again, but no luck.

~ $ rustup update
info: syncing channel updates for 'stable-x86_64-pc-windows-msvc'
info: syncing channel updates for 'nightly-x86_64-pc-windows-msvc'
info: checking for self-updates

   stable-x86_64-pc-windows-msvc unchanged - rustc 1.31.0 (abe02cefd 2018-12-04)
  nightly-x86_64-pc-windows-msvc unchanged - rustc 1.32.0-nightly (4a45578bc 2018-12-07)

~ $ rustup component add rustfmt --toolchain nightly
error: component 'rustfmt' for target 'x86_64-pc-windows-msvc' is unavailable for download
~ $ rustup component add rustfmt-preview --toolchain nightly
error: component 'rustfmt' for target 'x86_64-pc-windows-msvc' is unavailable for download
~ $ rustup component add clippy --toolchain nightly
error: component 'clippy' for target 'x86_64-pc-windows-msvc' is unavailable for download
~ $ rustup component add clippy-preview --toolchain nightly
error: component 'clippy' for target 'x86_64-pc-windows-msvc' is unavailable for download
4 Likes

I have a similar problem on OSX. rustfmt and clippy were installed with my previous nightly distributions, but ever since stable 1.31.0 they have shown up as missing components when I attempt to compile nightly.

Sometimes certain components of rust don't compile in nightly so they simply aren't included in that release, therefore leading to it being unavailable. I'd just wait until tomorrow or the day after to install.

I see. Thanks for your explanation. :grinning:

1 Like

I have a similar problem on linux. clippy rustfmt and rls have been unavailable for weeks now.
Has this been really fixed?

$ rustup update nightly
info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'
info: latest update on 2019-02-19, rust version 1.34.0-nightly (146aa60f3 2019-02-18)
error: some components unavailable for download: 'clippy', 'rustfmt', 'rls'

Here are links that maybe helpful for checking rust tools build state
https://rust-lang-nursery.github.io/rust-toolstate/
https://mexus.github.io/rustup-components-history/
Looks like those components are available in nightly 2019-02-21.

2 Likes

https://github.com/rust-lang/rust/pull/58337 was the original issue for that. It has been superseeded by https://github.com/rust-lang/rust/pull/58571 and been merged yesterday so clippy is available again :partying_face:

Will this be a regular issue?

It can happen. It's a nightly channel, it can crash, it can ICE, it can break your code, it can sometimes not work the intended way. Either accept that or use the stable channel :slight_smile:

2 Likes

This 100%. In my opinion the Nightly compiler should print a warning with something similar every time it’s invoked. I see similar error reports pop up on a regular basis in various projects on github.