From 8dcc51c78d58a5bb9ab91953720eada949d6e8a4 Mon Sep 17 00:00:00 2001 From: Joshua Nelson Date: Sat, 7 May 2022 10:41:51 -0500 Subject: [PATCH] Try removing UI test dependencies from clippy itself and see what breaks --- Cargo.lock | 12 +-------- src/tools/clippy/Cargo.toml | 10 -------- src/tools/clippy/tests/compile-test.rs | 25 +------------------ .../clippy/ui-test-dependencies/Cargo.toml | 2 +- 4 files changed, 3 insertions(+), 46 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b6089f50fc6bf..3335a0be31f3e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -659,24 +659,14 @@ dependencies = [ "clippy_lints", "clippy_utils", "compiletest_rs", - "derive-new", "filetime", - "futures 0.3.19", - "if_chain", - "itertools", - "parking_lot 0.12.1", - "quote", "regex", - "rustc-semver", "rustc-workspace-hack", "rustc_tools_util 0.2.0", "semver", - "serde", - "syn", "tempfile", "termize", "tester", - "tokio", "ui-test-dependencies", ] @@ -5533,7 +5523,7 @@ dependencies = [ "futures 0.3.19", "if_chain", "itertools", - "parking_lot 0.11.2", + "parking_lot 0.12.1", "quote", "regex", "rustc-semver", diff --git a/src/tools/clippy/Cargo.toml b/src/tools/clippy/Cargo.toml index 717ee9f19e95d..6b89ed828d8fa 100644 --- a/src/tools/clippy/Cargo.toml +++ b/src/tools/clippy/Cargo.toml @@ -42,16 +42,6 @@ rustc-workspace-hack = "1.0" # UI test dependencies ui-test-dependencies = { path = "ui-test-dependencies" } clippy_utils = { path = "clippy_utils" } -derive-new = "0.5" -if_chain = "1.0" -itertools = "0.10.1" -quote = "1.0" -serde = { version = "1.0.125", features = ["derive"] } -syn = { version = "1.0", features = ["full"] } -futures = "0.3" -parking_lot = "0.12" -tokio = { version = "1", features = ["io-util"] } -rustc-semver = "1.1" [build-dependencies] rustc_tools_util = { version = "0.2", path = "rustc_tools_util" } diff --git a/src/tools/clippy/tests/compile-test.rs b/src/tools/clippy/tests/compile-test.rs index 5ce13582d6377..c9b8e5c124f80 100644 --- a/src/tools/clippy/tests/compile-test.rs +++ b/src/tools/clippy/tests/compile-test.rs @@ -39,29 +39,6 @@ static TEST_DEPENDENCIES: &[&str] = &[ "rustc_semver", ]; -// Test dependencies may need an `extern crate` here to ensure that they show up -// in the depinfo file (otherwise cargo thinks they are unused) -#[allow(unused_extern_crates)] -extern crate clippy_utils; -#[allow(unused_extern_crates)] -extern crate derive_new; -#[allow(unused_extern_crates)] -extern crate futures; -#[allow(unused_extern_crates)] -extern crate if_chain; -#[allow(unused_extern_crates)] -extern crate itertools; -#[allow(unused_extern_crates)] -extern crate parking_lot; -#[allow(unused_extern_crates)] -extern crate quote; -#[allow(unused_extern_crates)] -extern crate rustc_semver; -#[allow(unused_extern_crates)] -extern crate syn; -#[allow(unused_extern_crates)] -extern crate tokio; - /// Produces a string with an `--extern` flag for all UI test crate /// dependencies. /// @@ -124,7 +101,7 @@ static EXTERN_FLAGS: SyncLazy = SyncLazy::new(|| { .filter(|n| !crates.contains_key(n)) .collect(); if option_env!("RUSTC_TEST_SUITE").is_some() { - // Bootstrap doesn't build clippy_utils, but that's ok since clippy only uses it for dogfood tests. + // Bootstrap doesn't build clippy_utils, but that's ok since clippy only uses it for internal UI tests. not_found.drain_filter(|x| *x == "clippy_utils"); } assert!( diff --git a/src/tools/clippy/ui-test-dependencies/Cargo.toml b/src/tools/clippy/ui-test-dependencies/Cargo.toml index a24a45f39c034..bbe297efdadee 100644 --- a/src/tools/clippy/ui-test-dependencies/Cargo.toml +++ b/src/tools/clippy/ui-test-dependencies/Cargo.toml @@ -15,6 +15,6 @@ quote = "1.0" serde = { version = "1.0.125", features = ["derive"] } syn = { version = "1.0", features = ["full"] } futures = "0.3" -parking_lot = "0.11.2" +parking_lot = "0.12" tokio = { version = "1", features = ["io-util"] } rustc-semver = "1.1"