热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

failstoinstallviagitasfallbackwhenmissingfromnightly

Imusingclippyontravis.Asweallknow,clippysometimesfailstocatchupintim

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:

1
2
3
`

  - 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:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
`

   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

`

该提问来源于开源项目:rust-lang/rust-clippy

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.

https://github.com/rust-lang-nursery/rustup.rs/issues/1501





   



推荐阅读
author-avatar
莫怀嘉805
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有