From bb9fe6926ec00390d883818179c939226d512f32 Mon Sep 17 00:00:00 2001 From: Denis Cornehl Date: Thu, 27 Jun 2024 08:42:32 +0200 Subject: [PATCH] always compile consistency check features, since we really use it now --- Cargo.toml | 7 ++----- src/bin/cratesfyi.rs | 2 -- src/index.rs | 1 - src/utils/mod.rs | 1 - 4 files changed, 2 insertions(+), 9 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 09d09ad8c..f0016dc49 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,9 +16,6 @@ exclude = [ ".rustwide-docker", ] -[features] -consistency_check = ["crates-index", "itertools"] - [dependencies] sentry = "0.34.0" sentry-panic = "0.34.0" @@ -31,7 +28,7 @@ tracing-subscriber = { version = "0.3.16", default-features = false, features = tracing-log = "0.2.0" regex = "1" clap = { version = "4.0.22", features = [ "derive" ] } -crates-index = { version = "3.0.0", default-features = false, features = ["git", "git-performance", "parallel"], optional = true } +crates-index = { version = "3.0.0", default-features = false, features = ["git", "git-performance", "parallel"] } rayon = "1.6.1" num_cpus = "1.15.0" crates-index-diff = { version = "24.0.0", features = [ "max-performance" ]} @@ -67,7 +64,7 @@ postgres-types = { version = "0.2", features = ["derive"] } zip = {version = "2.1.3", default-features = false, features = ["bzip2"]} bzip2 = "0.4.4" getrandom = "0.2.1" -itertools = { version = "0.13.0", optional = true} +itertools = { version = "0.13.0" } rusqlite = { version = "0.30.0", features = ["bundled"] } hex = "0.4.3" diff --git a/src/bin/cratesfyi.rs b/src/bin/cratesfyi.rs index 0d8b46ca6..4b3b88e58 100644 --- a/src/bin/cratesfyi.rs +++ b/src/bin/cratesfyi.rs @@ -546,7 +546,6 @@ enum DatabaseSubcommand { }, /// Compares the database with the index and resolves inconsistencies - #[cfg(feature = "consistency_check")] Synchronize { /// Don't actually resolve the inconsistencies, just log them #[arg(long)] @@ -640,7 +639,6 @@ impl DatabaseSubcommand { Self::Limits { command } => command.handle_args(ctx)?, - #[cfg(feature = "consistency_check")] Self::Synchronize { dry_run } => { docs_rs::utils::consistency::run_check(&ctx, dry_run)?; } diff --git a/src/index.rs b/src/index.rs index 9d4ecd537..ad3195ccd 100644 --- a/src/index.rs +++ b/src/index.rs @@ -57,7 +57,6 @@ impl Index { Ok(diff) } - #[cfg(feature = "consistency_check")] pub(crate) fn crates(&self) -> Result { tracing::debug!("Opening with `crates_index`"); // crates_index requires the repo url to match the existing origin or it tries to reinitialize the repo diff --git a/src/utils/mod.rs b/src/utils/mod.rs index b6fc8c926..06c6d0533 100644 --- a/src/utils/mod.rs +++ b/src/utils/mod.rs @@ -15,7 +15,6 @@ pub(crate) use self::rustc_version::{get_correct_docsrs_style_file, parse_rustc_ pub(crate) use self::cargo_metadata::{Dependency, Target}; mod cargo_metadata; -#[cfg(feature = "consistency_check")] pub mod consistency; mod copy; pub mod daemon;