Skip to content

Commit 68620b1

Browse files
committed
Inject clippy into the rls again
Also makes sure we actually point to the local rls
1 parent a80a610 commit 68620b1

File tree

3 files changed

+15
-31
lines changed

3 files changed

+15
-31
lines changed

src/Cargo.lock

+1-27
Original file line numberDiff line numberDiff line change
@@ -1706,7 +1706,7 @@ dependencies = [
17061706
"rls-rustc 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
17071707
"rls-span 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
17081708
"rls-vfs 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
1709-
"rustfmt-nightly 0.8.2 (git+https://github.com/rust-lang-nursery/rustfmt?rev=5e5992517d3591e2708d4ca6b155dfcbdf3344b9)",
1709+
"rustfmt-nightly 0.8.2",
17101710
"serde 1.0.69 (registry+https://github.com/rust-lang/crates.io-index)",
17111711
"serde_derive 1.0.69 (registry+https://github.com/rust-lang/crates.io-index)",
17121712
"serde_json 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2367,31 +2367,6 @@ dependencies = [
23672367
"serde_json 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)",
23682368
]
23692369

2370-
[[package]]
2371-
name = "rustfmt-nightly"
2372-
version = "0.8.2"
2373-
source = "git+https://github.com/rust-lang-nursery/rustfmt?rev=5e5992517d3591e2708d4ca6b155dfcbdf3344b9#5e5992517d3591e2708d4ca6b155dfcbdf3344b9"
2374-
dependencies = [
2375-
"cargo_metadata 0.5.8 (registry+https://github.com/rust-lang/crates.io-index)",
2376-
"derive-new 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
2377-
"diff 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
2378-
"env_logger 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)",
2379-
"failure 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
2380-
"getopts 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
2381-
"isatty 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
2382-
"itertools 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)",
2383-
"log 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
2384-
"regex 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
2385-
"rustc-ap-rustc_target 182.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
2386-
"rustc-ap-syntax 182.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
2387-
"serde 1.0.69 (registry+https://github.com/rust-lang/crates.io-index)",
2388-
"serde_derive 1.0.69 (registry+https://github.com/rust-lang/crates.io-index)",
2389-
"serde_json 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)",
2390-
"term 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
2391-
"toml 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
2392-
"unicode-segmentation 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
2393-
]
2394-
23952370
[[package]]
23962371
name = "rustfmt-nightly"
23972372
version = "0.8.2"
@@ -3239,7 +3214,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
32393214
"checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda"
32403215
"checksum rustc_version 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a54aa04a10c68c1c4eacb4337fd883b435997ede17a9385784b990777686b09a"
32413216
"checksum rustfix 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9da3cf9b79dc889a2c9879643f26d7a53e37e9361c7566b7d2787d5ace0d8396"
3242-
"checksum rustfmt-nightly 0.8.2 (git+https://github.com/rust-lang-nursery/rustfmt?rev=5e5992517d3591e2708d4ca6b155dfcbdf3344b9)" = "<none>"
32433217
"checksum same-file 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cfb6eded0b06a0b512c8ddbcf04089138c9b4362c2f696f3c3d76039d68f3637"
32443218
"checksum schannel 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "dc1fabf2a7b6483a141426e1afd09ad543520a77ac49bd03c286e7696ccfd77f"
32453219
"checksum scoped-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "332ffa32bf586782a3efaeb58f127980944bbc8c4d6913a86107ac2a5ab24b28"

src/Cargo.toml

+5-4
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,11 @@ debug-assertions = false
6464
[patch."https://github.com/rust-lang/cargo"]
6565
cargo = { path = "tools/cargo" }
6666

67-
[patch.crates-io]
67+
[patch."https://github.com/rust-lang-nursery/rustfmt"]
6868
# Similar to Cargo above we want the RLS to use a vendored version of `rustfmt`
6969
# that we're shipping as well (to ensure that the rustfmt in RLS and the
70-
# `rustfmt` executable are the same exact vesion). Unlike Cargo, however, the
71-
# RLS depends on `rustfmt` from crates.io, so we put this in a `[patch]` section
72-
# for crates.io
70+
# `rustfmt` executable are the same exact version).
7371
rustfmt-nightly = { path = "tools/rustfmt" }
72+
73+
[patch."https://github.com/rust-lang-nursery/rust-clippy"]
74+
clippy = { path = "tools/clippy" }

src/bootstrap/tool.rs

+9
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,15 @@ tool_extended!((self, builder),
594594
};
595595
Miri, miri, "src/tools/miri", "miri", {};
596596
Rls, rls, "src/tools/rls", "rls", {
597+
let clippy = builder.ensure(Clippy {
598+
compiler: self.compiler,
599+
target: self.target,
600+
extra_features: Vec::new(),
601+
});
602+
let channel = &builder.config.channel;
603+
if clippy.is_some() && channel != "stable" && channel != "beta" {
604+
self.extra_features.push("clippy".to_owned());
605+
}
597606
builder.ensure(native::Openssl {
598607
target: self.target,
599608
});

0 commit comments

Comments
 (0)