Skip to content

Commit 8dcc51c

Browse files
committed
Try removing UI test dependencies from clippy itself and see what breaks
1 parent ff32394 commit 8dcc51c

File tree

4 files changed

+3
-46
lines changed

4 files changed

+3
-46
lines changed

Diff for: Cargo.lock

+1-11
Original file line numberDiff line numberDiff line change
@@ -659,24 +659,14 @@ dependencies = [
659659
"clippy_lints",
660660
"clippy_utils",
661661
"compiletest_rs",
662-
"derive-new",
663662
"filetime",
664-
"futures 0.3.19",
665-
"if_chain",
666-
"itertools",
667-
"parking_lot 0.12.1",
668-
"quote",
669663
"regex",
670-
"rustc-semver",
671664
"rustc-workspace-hack",
672665
"rustc_tools_util 0.2.0",
673666
"semver",
674-
"serde",
675-
"syn",
676667
"tempfile",
677668
"termize",
678669
"tester",
679-
"tokio",
680670
"ui-test-dependencies",
681671
]
682672

@@ -5533,7 +5523,7 @@ dependencies = [
55335523
"futures 0.3.19",
55345524
"if_chain",
55355525
"itertools",
5536-
"parking_lot 0.11.2",
5526+
"parking_lot 0.12.1",
55375527
"quote",
55385528
"regex",
55395529
"rustc-semver",

Diff for: src/tools/clippy/Cargo.toml

-10
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,6 @@ rustc-workspace-hack = "1.0"
4242
# UI test dependencies
4343
ui-test-dependencies = { path = "ui-test-dependencies" }
4444
clippy_utils = { path = "clippy_utils" }
45-
derive-new = "0.5"
46-
if_chain = "1.0"
47-
itertools = "0.10.1"
48-
quote = "1.0"
49-
serde = { version = "1.0.125", features = ["derive"] }
50-
syn = { version = "1.0", features = ["full"] }
51-
futures = "0.3"
52-
parking_lot = "0.12"
53-
tokio = { version = "1", features = ["io-util"] }
54-
rustc-semver = "1.1"
5545

5646
[build-dependencies]
5747
rustc_tools_util = { version = "0.2", path = "rustc_tools_util" }

Diff for: src/tools/clippy/tests/compile-test.rs

+1-24
Original file line numberDiff line numberDiff line change
@@ -39,29 +39,6 @@ static TEST_DEPENDENCIES: &[&str] = &[
3939
"rustc_semver",
4040
];
4141

42-
// Test dependencies may need an `extern crate` here to ensure that they show up
43-
// in the depinfo file (otherwise cargo thinks they are unused)
44-
#[allow(unused_extern_crates)]
45-
extern crate clippy_utils;
46-
#[allow(unused_extern_crates)]
47-
extern crate derive_new;
48-
#[allow(unused_extern_crates)]
49-
extern crate futures;
50-
#[allow(unused_extern_crates)]
51-
extern crate if_chain;
52-
#[allow(unused_extern_crates)]
53-
extern crate itertools;
54-
#[allow(unused_extern_crates)]
55-
extern crate parking_lot;
56-
#[allow(unused_extern_crates)]
57-
extern crate quote;
58-
#[allow(unused_extern_crates)]
59-
extern crate rustc_semver;
60-
#[allow(unused_extern_crates)]
61-
extern crate syn;
62-
#[allow(unused_extern_crates)]
63-
extern crate tokio;
64-
6542
/// Produces a string with an `--extern` flag for all UI test crate
6643
/// dependencies.
6744
///
@@ -124,7 +101,7 @@ static EXTERN_FLAGS: SyncLazy<String> = SyncLazy::new(|| {
124101
.filter(|n| !crates.contains_key(n))
125102
.collect();
126103
if option_env!("RUSTC_TEST_SUITE").is_some() {
127-
// Bootstrap doesn't build clippy_utils, but that's ok since clippy only uses it for dogfood tests.
104+
// Bootstrap doesn't build clippy_utils, but that's ok since clippy only uses it for internal UI tests.
128105
not_found.drain_filter(|x| *x == "clippy_utils");
129106
}
130107
assert!(

Diff for: src/tools/clippy/ui-test-dependencies/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ quote = "1.0"
1515
serde = { version = "1.0.125", features = ["derive"] }
1616
syn = { version = "1.0", features = ["full"] }
1717
futures = "0.3"
18-
parking_lot = "0.11.2"
18+
parking_lot = "0.12"
1919
tokio = { version = "1", features = ["io-util"] }
2020
rustc-semver = "1.1"

0 commit comments

Comments
 (0)