diff --git a/Cargo.lock b/Cargo.lock index b25d6b635..b397e6890 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -853,15 +853,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "dirs" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" -dependencies = [ - "dirs-sys", -] - [[package]] name = "dirs-next" version = "2.0.0" @@ -872,18 +863,6 @@ dependencies = [ "dirs-sys-next", ] -[[package]] -name = "dirs-sys" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" -dependencies = [ - "libc", - "option-ext", - "redox_users", - "windows-sys 0.48.0", -] - [[package]] name = "dirs-sys-next" version = "0.1.2" @@ -930,7 +909,6 @@ dependencies = [ "cargo-util-schemas 0.7.2", "cargo_metadata", "chrono", - "dirs", "dunce", "dylint_internal", "env_logger", @@ -2794,12 +2772,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "option-ext" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" - [[package]] name = "ordered-float" version = "2.10.1" diff --git a/Cargo.toml b/Cargo.toml index 0dfc5f02e..f6e27e2b0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,7 +30,6 @@ chrono = { version = "0.4", default-features = false } clap = "4.5" compiletest_rs = "0.11" ctor = "0.2" -dirs = "5.0" dunce = "1.0" env_logger = "0.11" fs_extra = "1.3" diff --git a/cargo-dylint/tests/ci.rs b/cargo-dylint/tests/ci.rs index 3fd8e316f..d6c14eba2 100644 --- a/cargo-dylint/tests/ci.rs +++ b/cargo-dylint/tests/ci.rs @@ -257,10 +257,6 @@ fn license() { .unwrap() .lines() { - // smoelius: Exception for `dirs` dependencies. - if line == "MPL-2.0 (1): option-ext" { - continue; - } // smoelius: Exception for Cargo dependencies. if line == "MPL-2.0+ (3): bitmaps, im-rc, sized-chunks" { continue; diff --git a/dylint/Cargo.toml b/dylint/Cargo.toml index f1fef705c..b13236d87 100644 --- a/dylint/Cargo.toml +++ b/dylint/Cargo.toml @@ -18,7 +18,6 @@ cargo-util = { workspace = true, optional = true } cargo-util-schemas = { workspace = true, optional = true } cargo_metadata = { workspace = true } chrono = { workspace = true, optional = true } -dirs = { workspace = true } dunce = { workspace = true, optional = true } fs_extra = { workspace = true, optional = true } glob = { workspace = true, optional = true } diff --git a/dylint/src/driver_builder.rs b/dylint/src/driver_builder.rs index f58188e09..6526a9440 100644 --- a/dylint/src/driver_builder.rs +++ b/dylint/src/driver_builder.rs @@ -2,7 +2,7 @@ use crate::{error::warn, opts}; use anyhow::{Context, Result, anyhow, ensure}; use cargo_metadata::MetadataCommand; use dylint_internal::{ - CommandExt, driver as dylint_driver, env, + CommandExt, driver as dylint_driver, env, home, rustup::{SanitizeEnvironment, toolchain_path}, }; use semver::Version; @@ -98,7 +98,7 @@ fn dylint_drivers() -> Result { ensure!(dylint_drivers.is_dir()); Ok(dylint_drivers.to_path_buf()) } else { - let home = dirs::home_dir().ok_or_else(|| anyhow!("Could not find HOME directory"))?; + let home = home::home_dir().ok_or_else(|| anyhow!("Could not find HOME directory"))?; let dylint_drivers = Path::new(&home).join(".dylint_drivers"); if !dylint_drivers.is_dir() { create_dir_all(&dylint_drivers).with_context(|| { diff --git a/examples/experimental/derive_opportunity/Cargo.lock b/examples/experimental/derive_opportunity/Cargo.lock index eb06a03fc..988f16e90 100644 --- a/examples/experimental/derive_opportunity/Cargo.lock +++ b/examples/experimental/derive_opportunity/Cargo.lock @@ -244,15 +244,6 @@ dependencies = [ "crypto-common", ] -[[package]] -name = "dirs" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" -dependencies = [ - "dirs-sys", -] - [[package]] name = "dirs-next" version = "2.0.0" @@ -263,18 +254,6 @@ dependencies = [ "dirs-sys-next", ] -[[package]] -name = "dirs-sys" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" -dependencies = [ - "libc", - "option-ext", - "redox_users", - "windows-sys 0.48.0", -] - [[package]] name = "dirs-sys-next" version = "0.1.2" @@ -304,7 +283,6 @@ dependencies = [ "ansi_term", "anyhow", "cargo_metadata", - "dirs", "dylint_internal", "log", "once_cell", @@ -849,12 +827,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "option-ext" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" - [[package]] name = "paste" version = "1.0.15" diff --git a/examples/experimental/missing_doc_comment_openai/Cargo.lock b/examples/experimental/missing_doc_comment_openai/Cargo.lock index 6395c6df3..bd4ab7ba7 100644 --- a/examples/experimental/missing_doc_comment_openai/Cargo.lock +++ b/examples/experimental/missing_doc_comment_openai/Cargo.lock @@ -260,15 +260,6 @@ dependencies = [ "crypto-common", ] -[[package]] -name = "dirs" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" -dependencies = [ - "dirs-sys", -] - [[package]] name = "dirs-next" version = "2.0.0" @@ -279,18 +270,6 @@ dependencies = [ "dirs-sys-next", ] -[[package]] -name = "dirs-sys" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" -dependencies = [ - "libc", - "option-ext", - "redox_users", - "windows-sys 0.48.0", -] - [[package]] name = "dirs-sys-next" version = "0.1.2" @@ -320,7 +299,6 @@ dependencies = [ "ansi_term", "anyhow", "cargo_metadata", - "dirs", "dylint_internal", "log", "once_cell", @@ -877,12 +855,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "option-ext" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" - [[package]] name = "paste" version = "1.0.15" diff --git a/examples/experimental/overscoped_allow/Cargo.lock b/examples/experimental/overscoped_allow/Cargo.lock index 04ac88165..0d5ade2bd 100644 --- a/examples/experimental/overscoped_allow/Cargo.lock +++ b/examples/experimental/overscoped_allow/Cargo.lock @@ -253,15 +253,6 @@ dependencies = [ "crypto-common", ] -[[package]] -name = "dirs" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" -dependencies = [ - "dirs-sys", -] - [[package]] name = "dirs-next" version = "2.0.0" @@ -272,18 +263,6 @@ dependencies = [ "dirs-sys-next", ] -[[package]] -name = "dirs-sys" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" -dependencies = [ - "libc", - "option-ext", - "redox_users", - "windows-sys 0.48.0", -] - [[package]] name = "dirs-sys-next" version = "0.1.2" @@ -319,7 +298,6 @@ dependencies = [ "ansi_term", "anyhow", "cargo_metadata", - "dirs", "dylint_internal", "log", "once_cell", @@ -864,12 +842,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "option-ext" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" - [[package]] name = "overscoped_allow" version = "4.0.0" diff --git a/examples/general/Cargo.lock b/examples/general/Cargo.lock index f4f8a4891..ab7562fdf 100644 --- a/examples/general/Cargo.lock +++ b/examples/general/Cargo.lock @@ -327,15 +327,6 @@ dependencies = [ "crypto-common", ] -[[package]] -name = "dirs" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" -dependencies = [ - "dirs-sys", -] - [[package]] name = "dirs-next" version = "2.0.0" @@ -346,18 +337,6 @@ dependencies = [ "dirs-sys-next", ] -[[package]] -name = "dirs-sys" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" -dependencies = [ - "libc", - "option-ext", - "redox_users", - "windows-sys 0.48.0", -] - [[package]] name = "dirs-sys-next" version = "0.1.2" @@ -393,7 +372,6 @@ dependencies = [ "ansi_term", "anyhow", "cargo_metadata 0.19.1", - "dirs", "dylint_internal", "log", "once_cell", @@ -1009,12 +987,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "option-ext" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" - [[package]] name = "paste" version = "1.0.15" diff --git a/examples/restriction/Cargo.lock b/examples/restriction/Cargo.lock index eb3210ed1..c57d23970 100644 --- a/examples/restriction/Cargo.lock +++ b/examples/restriction/Cargo.lock @@ -341,15 +341,6 @@ dependencies = [ "crypto-common", ] -[[package]] -name = "dirs" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" -dependencies = [ - "dirs-sys", -] - [[package]] name = "dirs-next" version = "2.0.0" @@ -360,18 +351,6 @@ dependencies = [ "dirs-sys-next", ] -[[package]] -name = "dirs-sys" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" -dependencies = [ - "libc", - "option-ext", - "redox_users", - "windows-sys 0.48.0", -] - [[package]] name = "dirs-sys-next" version = "0.1.2" @@ -415,7 +394,6 @@ dependencies = [ "ansi_term", "anyhow", "cargo_metadata 0.19.1", - "dirs", "dylint_internal", "log", "once_cell", @@ -1010,12 +988,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "option-ext" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" - [[package]] name = "paste" version = "1.0.15" diff --git a/examples/supplementary/Cargo.lock b/examples/supplementary/Cargo.lock index 7d340d32d..5aac35ce9 100644 --- a/examples/supplementary/Cargo.lock +++ b/examples/supplementary/Cargo.lock @@ -320,15 +320,6 @@ dependencies = [ "crypto-common", ] -[[package]] -name = "dirs" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" -dependencies = [ - "dirs-sys", -] - [[package]] name = "dirs-next" version = "2.0.0" @@ -339,18 +330,6 @@ dependencies = [ "dirs-sys-next", ] -[[package]] -name = "dirs-sys" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" -dependencies = [ - "libc", - "option-ext", - "redox_users", - "windows-sys 0.48.0", -] - [[package]] name = "dirs-sys-next" version = "0.1.2" @@ -380,7 +359,6 @@ dependencies = [ "ansi_term", "anyhow", "cargo_metadata 0.19.1", - "dirs", "dylint_internal", "log", "once_cell", @@ -991,12 +969,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "option-ext" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" - [[package]] name = "paste" version = "1.0.15" diff --git a/examples/testing/clippy/Cargo.lock b/examples/testing/clippy/Cargo.lock index fcd54c73f..f2b698ad1 100644 --- a/examples/testing/clippy/Cargo.lock +++ b/examples/testing/clippy/Cargo.lock @@ -294,15 +294,6 @@ dependencies = [ "crypto-common", ] -[[package]] -name = "dirs" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" -dependencies = [ - "dirs-sys", -] - [[package]] name = "dirs-next" version = "2.0.0" @@ -313,18 +304,6 @@ dependencies = [ "dirs-sys-next", ] -[[package]] -name = "dirs-sys" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" -dependencies = [ - "libc", - "option-ext", - "redox_users", - "windows-sys 0.48.0", -] - [[package]] name = "dirs-sys-next" version = "0.1.2" @@ -354,7 +333,6 @@ dependencies = [ "ansi_term", "anyhow", "cargo_metadata 0.19.1", - "dirs", "dylint_internal", "log", "once_cell", @@ -899,12 +877,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "option-ext" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" - [[package]] name = "paste" version = "1.0.15" diff --git a/examples/testing/straggler/Cargo.lock b/examples/testing/straggler/Cargo.lock index 96e03f373..32832fc8f 100644 --- a/examples/testing/straggler/Cargo.lock +++ b/examples/testing/straggler/Cargo.lock @@ -230,15 +230,6 @@ dependencies = [ "crypto-common", ] -[[package]] -name = "dirs" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" -dependencies = [ - "dirs-sys", -] - [[package]] name = "dirs-next" version = "2.0.0" @@ -249,18 +240,6 @@ dependencies = [ "dirs-sys-next", ] -[[package]] -name = "dirs-sys" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" -dependencies = [ - "libc", - "option-ext", - "redox_users", - "windows-sys 0.48.0", -] - [[package]] name = "dirs-sys-next" version = "0.1.2" @@ -290,7 +269,6 @@ dependencies = [ "ansi_term", "anyhow", "cargo_metadata", - "dirs", "dylint_internal", "log", "once_cell", @@ -835,12 +813,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "option-ext" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" - [[package]] name = "paste" version = "1.0.15" diff --git a/scheduled/supply_chain/aarch64-apple-darwin.json b/scheduled/supply_chain/aarch64-apple-darwin.json index ae0811eb3..6b130f5ba 100644 --- a/scheduled/supply_chain/aarch64-apple-darwin.json +++ b/scheduled/supply_chain/aarch64-apple-darwin.json @@ -654,14 +654,6 @@ "name": "Artyom Pavlov" } ], - "dirs": [ - { - "id": 2022, - "kind": "user", - "login": "soc", - "name": null - } - ], "dirs-next": [ { "id": 13677, @@ -676,14 +668,6 @@ "name": "Nathan McCarty" } ], - "dirs-sys": [ - { - "id": 2022, - "kind": "user", - "login": "soc", - "name": null - } - ], "dirs-sys-next": [ { "id": 13677, @@ -1648,14 +1632,6 @@ "name": "Alex Gaynor" } ], - "option-ext": [ - { - "id": 2022, - "kind": "user", - "login": "soc", - "name": null - } - ], "ordered-float": [ { "id": 4, diff --git a/scheduled/supply_chain/x86_64-apple-darwin.json b/scheduled/supply_chain/x86_64-apple-darwin.json index ae0811eb3..6b130f5ba 100644 --- a/scheduled/supply_chain/x86_64-apple-darwin.json +++ b/scheduled/supply_chain/x86_64-apple-darwin.json @@ -654,14 +654,6 @@ "name": "Artyom Pavlov" } ], - "dirs": [ - { - "id": 2022, - "kind": "user", - "login": "soc", - "name": null - } - ], "dirs-next": [ { "id": 13677, @@ -676,14 +668,6 @@ "name": "Nathan McCarty" } ], - "dirs-sys": [ - { - "id": 2022, - "kind": "user", - "login": "soc", - "name": null - } - ], "dirs-sys-next": [ { "id": 13677, @@ -1648,14 +1632,6 @@ "name": "Alex Gaynor" } ], - "option-ext": [ - { - "id": 2022, - "kind": "user", - "login": "soc", - "name": null - } - ], "ordered-float": [ { "id": 4, diff --git a/scheduled/supply_chain/x86_64-pc-windows-msvc.json b/scheduled/supply_chain/x86_64-pc-windows-msvc.json index 348a48df5..f8d63ae2b 100644 --- a/scheduled/supply_chain/x86_64-pc-windows-msvc.json +++ b/scheduled/supply_chain/x86_64-pc-windows-msvc.json @@ -608,14 +608,6 @@ "name": "Artyom Pavlov" } ], - "dirs": [ - { - "id": 2022, - "kind": "user", - "login": "soc", - "name": null - } - ], "dirs-next": [ { "id": 13677, @@ -630,14 +622,6 @@ "name": "Nathan McCarty" } ], - "dirs-sys": [ - { - "id": 2022, - "kind": "user", - "login": "soc", - "name": null - } - ], "dirs-sys-next": [ { "id": 13677, @@ -1560,14 +1544,6 @@ "name": "Michal 'vorner' Vaner" } ], - "option-ext": [ - { - "id": 2022, - "kind": "user", - "login": "soc", - "name": null - } - ], "ordered-float": [ { "id": 4, diff --git a/scheduled/supply_chain/x86_64-unknown-linux-gnu.json b/scheduled/supply_chain/x86_64-unknown-linux-gnu.json index 076274f95..5fd06b866 100644 --- a/scheduled/supply_chain/x86_64-unknown-linux-gnu.json +++ b/scheduled/supply_chain/x86_64-unknown-linux-gnu.json @@ -608,14 +608,6 @@ "name": "Artyom Pavlov" } ], - "dirs": [ - { - "id": 2022, - "kind": "user", - "login": "soc", - "name": null - } - ], "dirs-next": [ { "id": 13677, @@ -630,14 +622,6 @@ "name": "Nathan McCarty" } ], - "dirs-sys": [ - { - "id": 2022, - "kind": "user", - "login": "soc", - "name": null - } - ], "dirs-sys-next": [ { "id": 13677, @@ -1618,14 +1602,6 @@ "name": "Alex Gaynor" } ], - "option-ext": [ - { - "id": 2022, - "kind": "user", - "login": "soc", - "name": null - } - ], "ordered-float": [ { "id": 4,