Skip to content

Commit

Permalink
Try removing UI test dependencies from clippy itself and see what breaks
Browse files Browse the repository at this point in the history
  • Loading branch information
jyn514 committed Jun 18, 2022
1 parent ff32394 commit 8dcc51c
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 46 deletions.
12 changes: 1 addition & 11 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]

Expand Down Expand Up @@ -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",
Expand Down
10 changes: 0 additions & 10 deletions src/tools/clippy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
25 changes: 1 addition & 24 deletions src/tools/clippy/tests/compile-test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
///
Expand Down Expand Up @@ -124,7 +101,7 @@ static EXTERN_FLAGS: SyncLazy<String> = 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!(
Expand Down
2 changes: 1 addition & 1 deletion src/tools/clippy/ui-test-dependencies/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 8dcc51c

Please sign in to comment.