nabijaczleweli/cargo-update

Attempts to update clippy, but it is a standard component

igor-petruk opened this issue · 4 comments

Updating registry 'https://github.com/rust-lang/crates.io-index'

Package          Installed  Latest    Needs update
clippy           v0.0.179   v0.0.302  Yes
.....

Updating clippy
    Updating crates.io index
  Installing clippy v0.0.302
   Compiling libc v0.2.65
   Compiling byteorder v1.3.2
   Compiling dirs v1.0.5
   Compiling term v0.5.2
   Compiling clippy v0.0.302
error: failed to compile `clippy v0.0.302`, intermediate artifacts can be found at `/tmp/cargo-installxHfj2y`

Caused by:
  failed to run custom build command for `clippy v0.0.302`

Caused by:
  process didn't exit successfully: `/tmp/cargo-installxHfj2y/release/build/clippy-ffeedc2f188020a4/build-script-build` (exit code: 1)
--- stderr

error: Clippy is no longer available via crates.io

help: please run `rustup component add clippy-preview` instead

It should somehow skip it

Having tested the following

nabijaczleweli@tarta:~$ cat .cargo/.crates.toml
[v1]
"https 1.6.0 (path+file:///home/nabijaczleweli/uwu/http)" = ["http", "httplz"]
"termimage 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = ["termimage"]

nabijaczleweli@tarta:~$ rustup component add clippy
info: downloading component 'clippy'
info: installing component 'clippy'

nabijaczleweli@tarta:~$ cat .cargo/.crates.toml
[v1]
"https 1.6.0 (path+file:///home/nabijaczleweli/uwu/http)" = ["http", "httplz"]
"termimage 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = ["termimage"]

If you have clippy installed as a rustup component, you probably shouldn't have it in your .crates.toml. Try running cargo install --list and see if it's listed there maybe?

Oh, I see. I did not know about that file. I think what happened in my case

  1. Installed clippy via cargo install in the old days
  2. Removed it via rm
  3. Installed it as a component
  4. Clippy is removed from crates.io.
  5. I run install-update

Thanks for help. I've removed the entry from .crates.toml.

The issue can be closed, but it might be a good idea for the "Troubleshooting" entry in the documentation.

That's good to hear, and thank you for the suggestion!

Released in v2.4.0