From 1368cb34d1b3cbcb6a26f3e337cb94cbe9e8ae5f Mon Sep 17 00:00:00 2001 From: Cameron Steffen Date: Fri, 26 Feb 2021 12:10:24 -0600 Subject: [PATCH 1/5] Revert "Test workspace at once" This reverts commit e355652fec704f307b50d42fb6a08172dc1e08bf. --- .github/workflows/clippy.yml | 12 ++++++++++-- .github/workflows/clippy_bors.yml | 12 ++++++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml index f6ac936df..9d5e12aac 100644 --- a/.github/workflows/clippy.yml +++ b/.github/workflows/clippy.yml @@ -53,8 +53,16 @@ jobs: - name: Test "--fix -Zunstable-options" run: cargo run --features deny-warnings,internal-lints --bin cargo-clippy -- clippy --fix -Zunstable-options - - name: Test Workspace - run: cargo test --all --features deny-warnings,internal-lints + - name: Test + run: cargo test --features deny-warnings,internal-lints + + - name: Test clippy_lints + run: cargo test --features deny-warnings,internal-lints + working-directory: clippy_lints + + - name: Test rustc_tools_util + run: cargo test --features deny-warnings + working-directory: rustc_tools_util - name: Test clippy_dev run: cargo test --features deny-warnings diff --git a/.github/workflows/clippy_bors.yml b/.github/workflows/clippy_bors.yml index 9d24b0293..5d846eb64 100644 --- a/.github/workflows/clippy_bors.yml +++ b/.github/workflows/clippy_bors.yml @@ -112,8 +112,16 @@ jobs: - name: Build run: cargo build --features deny-warnings,internal-lints - - name: Test Workspace - run: cargo test --all --features deny-warnings,internal-lints + - name: Test + run: cargo test --features deny-warnings,internal-lints + + - name: Test clippy_lints + run: cargo test --features deny-warnings,internal-lints + working-directory: clippy_lints + + - name: Test rustc_tools_util + run: cargo test --features deny-warnings + working-directory: rustc_tools_util - name: Test clippy_dev run: cargo test --features deny-warnings From 814b006d03187c8ec41fad0f654cde2a6dfea4c7 Mon Sep 17 00:00:00 2001 From: Cameron Steffen Date: Fri, 26 Feb 2021 12:11:35 -0600 Subject: [PATCH 2/5] Revert "Fix lintcheck by excluding checked crates from workspace" This reverts commit aea55d2c6239e42a0a337d610d19061521565615. --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 1d6bf1ea0..b996e55c7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,7 @@ edition = "2018" publish = false [workspace] -exclude = ["clippy_dev", "mini-macro", "target/lintcheck/crates"] +exclude = ["clippy_dev", "mini-macro"] [[bin]] name = "cargo-clippy" From fb905dffb48cde2eeae55a44db15719517af5842 Mon Sep 17 00:00:00 2001 From: Cameron Steffen Date: Fri, 26 Feb 2021 12:11:47 -0600 Subject: [PATCH 3/5] Revert "Add workspace to manifest" This reverts commit 9bcb257985d5a16355bdd62998935f16d09b42e2. --- Cargo.toml | 3 --- 1 file changed, 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b996e55c7..ea32a8edd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,9 +18,6 @@ build = "build.rs" edition = "2018" publish = false -[workspace] -exclude = ["clippy_dev", "mini-macro"] - [[bin]] name = "cargo-clippy" test = false From aef6dc23eed7cc20bff2fe7cdea058cd7c1346f7 Mon Sep 17 00:00:00 2001 From: Cameron Steffen Date: Fri, 26 Feb 2021 12:12:33 -0600 Subject: [PATCH 4/5] Add package arguments to dogfood test This is necessary after migrating to RUSTC_WORKSPACE_WRAPPER. --- tests/dogfood.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/dogfood.rs b/tests/dogfood.rs index 052223d6d..8fe48a67b 100644 --- a/tests/dogfood.rs +++ b/tests/dogfood.rs @@ -26,6 +26,7 @@ fn dogfood_clippy() { .arg("clippy-preview") .arg("--all-targets") .arg("--all-features") + .args(&["-p", "clippy_lints", "-p", "clippy_utils", "-p", "rustc_tools_util"]) .arg("--") .args(&["-D", "clippy::all"]) .args(&["-D", "clippy::pedantic"]) From d71ed26fd24d8121fcb08f7d4a5e00ce62e6e1fd Mon Sep 17 00:00:00 2001 From: Cameron Steffen Date: Fri, 26 Feb 2021 12:30:43 -0600 Subject: [PATCH 5/5] Revert "Fix versioncheck test" This reverts commit 1e7b1ccb2a05f80ae0a580401e7565fb1c0a4917. --- tests/versioncheck.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/versioncheck.rs b/tests/versioncheck.rs index 1c954c57a..aadd2c1fb 100644 --- a/tests/versioncheck.rs +++ b/tests/versioncheck.rs @@ -9,15 +9,15 @@ fn check_that_clippy_lints_and_clippy_utils_have_the_same_version_as_clippy() { .expect("could not obtain cargo metadata"); for krate in &["clippy_lints", "clippy_utils"] { - let krate_meta = clippy_meta - .packages - .iter() - .find(|package| package.name == *krate) + let krate_meta = cargo_metadata::MetadataCommand::new() + .current_dir(std::env::current_dir().unwrap().join(krate)) + .no_deps() + .exec() .expect("could not obtain cargo metadata"); - assert_eq!(krate_meta.version, clippy_meta.packages[0].version); + assert_eq!(krate_meta.packages[0].version, clippy_meta.packages[0].version); for package in &clippy_meta.packages[0].dependencies { if package.name == *krate { - assert!(package.req.matches(&krate_meta.version)); + assert!(package.req.matches(&krate_meta.packages[0].version)); break; } }