Skip to content
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

Attempts to update clippy, but it is a standard component #118

Closed
igor-petruk opened this issue Nov 12, 2019 · 4 comments
Closed

Attempts to update clippy, but it is a standard component #118

igor-petruk opened this issue Nov 12, 2019 · 4 comments
Labels

Comments

@igor-petruk
Copy link

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

@nabijaczleweli
Copy link
Owner

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?

@igor-petruk
Copy link
Author

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.

@nabijaczleweli
Copy link
Owner

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

@nabijaczleweli
Copy link
Owner

Released in v2.4.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants