From: Oliver Schneider Date: Mon, 9 Jul 2018 08:04:28 +0000 (+0200) Subject: Inject clippy into the rls again X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=68620b14a29d0db5f3b857ed1bd7348092a15b14;p=rust.git Inject clippy into the rls again Also makes sure we actually point to the local rls --- diff --git a/src/Cargo.lock b/src/Cargo.lock index d91a165e537..73a2630911f 100644 --- a/src/Cargo.lock +++ b/src/Cargo.lock @@ -1706,7 +1706,7 @@ dependencies = [ "rls-rustc 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rls-span 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rls-vfs 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "rustfmt-nightly 0.8.2 (git+https://github.com/rust-lang-nursery/rustfmt?rev=5e5992517d3591e2708d4ca6b155dfcbdf3344b9)", + "rustfmt-nightly 0.8.2", "serde 1.0.69 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.69 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2367,31 +2367,6 @@ dependencies = [ "serde_json 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "rustfmt-nightly" -version = "0.8.2" -source = "git+https://github.com/rust-lang-nursery/rustfmt?rev=5e5992517d3591e2708d4ca6b155dfcbdf3344b9#5e5992517d3591e2708d4ca6b155dfcbdf3344b9" -dependencies = [ - "cargo_metadata 0.5.8 (registry+https://github.com/rust-lang/crates.io-index)", - "derive-new 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "diff 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "env_logger 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)", - "failure 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "getopts 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)", - "isatty 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "itertools 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-ap-rustc_target 182.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-ap-syntax 182.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.69 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.69 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", - "term 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-segmentation 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "rustfmt-nightly" version = "0.8.2" @@ -3239,7 +3214,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" "checksum rustc_version 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a54aa04a10c68c1c4eacb4337fd883b435997ede17a9385784b990777686b09a" "checksum rustfix 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9da3cf9b79dc889a2c9879643f26d7a53e37e9361c7566b7d2787d5ace0d8396" -"checksum rustfmt-nightly 0.8.2 (git+https://github.com/rust-lang-nursery/rustfmt?rev=5e5992517d3591e2708d4ca6b155dfcbdf3344b9)" = "" "checksum same-file 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cfb6eded0b06a0b512c8ddbcf04089138c9b4362c2f696f3c3d76039d68f3637" "checksum schannel 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "dc1fabf2a7b6483a141426e1afd09ad543520a77ac49bd03c286e7696ccfd77f" "checksum scoped-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "332ffa32bf586782a3efaeb58f127980944bbc8c4d6913a86107ac2a5ab24b28" diff --git a/src/Cargo.toml b/src/Cargo.toml index 8ce4c97601b..135bed6200b 100644 --- a/src/Cargo.toml +++ b/src/Cargo.toml @@ -64,10 +64,11 @@ debug-assertions = false [patch."https://github.com/rust-lang/cargo"] cargo = { path = "tools/cargo" } -[patch.crates-io] +[patch."https://github.com/rust-lang-nursery/rustfmt"] # Similar to Cargo above we want the RLS to use a vendored version of `rustfmt` # that we're shipping as well (to ensure that the rustfmt in RLS and the -# `rustfmt` executable are the same exact vesion). Unlike Cargo, however, the -# RLS depends on `rustfmt` from crates.io, so we put this in a `[patch]` section -# for crates.io +# `rustfmt` executable are the same exact version). rustfmt-nightly = { path = "tools/rustfmt" } + +[patch."https://github.com/rust-lang-nursery/rust-clippy"] +clippy = { path = "tools/clippy" } diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs index b3d7b9a91ec..a22f5fd2252 100644 --- a/src/bootstrap/tool.rs +++ b/src/bootstrap/tool.rs @@ -594,6 +594,15 @@ fn run(mut $sel, $builder: &Builder) -> Option { }; Miri, miri, "src/tools/miri", "miri", {}; Rls, rls, "src/tools/rls", "rls", { + let clippy = builder.ensure(Clippy { + compiler: self.compiler, + target: self.target, + extra_features: Vec::new(), + }); + let channel = &builder.config.channel; + if clippy.is_some() && channel != "stable" && channel != "beta" { + self.extra_features.push("clippy".to_owned()); + } builder.ensure(native::Openssl { target: self.target, });