Skip to content

Commit

Permalink
always compile consistency check features, since we really use it now
Browse files Browse the repository at this point in the history
  • Loading branch information
syphar committed Jun 27, 2024
1 parent bbf1c3f commit bb9fe69
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 9 deletions.
7 changes: 2 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ exclude = [
".rustwide-docker",
]

[features]
consistency_check = ["crates-index", "itertools"]

[dependencies]
sentry = "0.34.0"
sentry-panic = "0.34.0"
Expand All @@ -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" ]}
Expand Down Expand Up @@ -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"

Expand Down
2 changes: 0 additions & 2 deletions src/bin/cratesfyi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down Expand Up @@ -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)?;
}
Expand Down
1 change: 0 additions & 1 deletion src/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ impl Index {
Ok(diff)
}

#[cfg(feature = "consistency_check")]
pub(crate) fn crates(&self) -> Result<crates_index::GitIndex> {
tracing::debug!("Opening with `crates_index`");
// crates_index requires the repo url to match the existing origin or it tries to reinitialize the repo
Expand Down
1 change: 0 additions & 1 deletion src/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit bb9fe69

Please sign in to comment.