Skip to content

fails to install via git as fallback when missing from nightly #3317

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

Closed
matthiaskrgr opened this issue Oct 15, 2018 · 4 comments
Closed

fails to install via git as fallback when missing from nightly #3317

matthiaskrgr opened this issue Oct 15, 2018 · 4 comments

Comments

@matthiaskrgr
Copy link
Member

I'm using clippy on travis.
As we all know, clippy sometimes fails to catch up in time and a nightly without clippy is shipped.

To mitigate failure of my travis job in this case, I was installing clippy from the git repo if it was not shipped with the nightly:

  - if [[ "$CLIPPY" == "true" ]]; then rustup component add clippy-preview --toolchain=nightly || cargo install --git https://github.com/rust-lang-nursery/rust-clippy/ --force clippy ; fi
  - if [[ "$CLIPPY" == "true" ]]; then cargo clippy --all-targets --all-features -- -D warnings ; exit ; fi

However it seems this no longer works:

   Updating git repository `https://github.com/rust-lang-nursery/rust-clippy/`
  Installing clippy v0.0.302 (https://github.com/rust-lang-nursery/rust-clippy/#5afdf8b7)
    Updating crates.io index
   Compiling byteorder v1.2.6
   Compiling term v0.5.1
   Compiling clippy v0.0.302 (https://github.com/rust-lang-nursery/rust-clippy/#5afdf8b7)
error: failed to compile `clippy v0.0.302 (https://github.com/rust-lang-nursery/rust-clippy/#5afdf8b7)`, intermediate artifacts can be found at `/tmp/cargo-install6BJ88g`

Caused by:
  failed to run custom build command for `clippy v0.0.302 (https://github.com/rust-lang-nursery/rust-clippy/#5afdf8b7)`
process didn't exit successfully: `/tmp/cargo-install6BJ88g/release/build/clippy-22caafa688c56f0f/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
@matthiaskrgr
Copy link
Member Author

cc @Manishearth

@Manishearth
Copy link
Member

Fixed, but I wouldn't consider this method of installation supported either.

@Manishearth
Copy link
Member

There's a way to tell rustup to only install nightlies with clippy IIRC

@matthiaskrgr
Copy link
Member Author

Thanks!

The problem is that afaik we cannot force to install (not update-to) a nightly that has clippy, if the latest nightly does not ship clippy.

rust-lang/rustup#1501

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

No branches or pull requests

2 participants