Skip to content

Commit

Permalink
fix: code review in rattler-index and test fix (#1109)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelzw authored Feb 27, 2025
1 parent 3947d72 commit c004e15
Show file tree
Hide file tree
Showing 4 changed files with 425 additions and 30 deletions.
39 changes: 19 additions & 20 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@ anyhow = "1.0.95"
archspec = "0.1.3"
assert_matches = "1.5.0"
async-compression = { version = "0.4.18", features = [
"gzip",
"tokio",
"bzip2",
"zstd",
"gzip",
"tokio",
"bzip2",
"zstd",
] }
async-fd-lock = "0.2.0"
fs4 = "0.12.0"
async-trait = "0.1.86"
axum = { version = "0.8.1", default-features = false, features = [
"tokio",
"http1",
"tokio",
"http1",
] }
base64 = "0.22.1"
bindgen = "0.71.1"
Expand All @@ -47,9 +47,9 @@ bzip2 = "0.5.1"
cache_control = "0.2.0"
cfg-if = "1.0"
chrono = { version = "0.4.39", default-features = false, features = [
"std",
"serde",
"alloc",
"std",
"serde",
"alloc",
] }
clap = { version = "4.5.29", features = ["derive"] }
clap-verbosity-flag = "3.0.1"
Expand All @@ -74,14 +74,14 @@ glob = "0.3.2"
google-cloud-auth = { version = "0.17.2", default-features = false }
google-cloud-token = "0.1.2"
aws-config = { version = "1.5.16", default-features = false, features = [
"rt-tokio",
"rustls",
"sso",
"rt-tokio",
"rustls",
"sso",
] }
aws-sdk-s3 = { version = "1.75.0", default-features = false, features = [
"rt-tokio",
"rustls",
"sigv4a",
"rt-tokio",
"rustls",
"sigv4a",
] }
hex = "0.4.3"
hex-literal = "0.4.1"
Expand Down Expand Up @@ -142,10 +142,10 @@ sha2 = "0.10.8"
shlex = "1.3.0"
similar-asserts = "1.6.1"
smallvec = { version = "1.13.2", features = [
"serde",
"const_new",
"const_generics",
"union",
"serde",
"const_new",
"const_generics",
"union",
] }
strum = { version = "0.27.0", features = ["derive"] }
superslice = "1.0.0"
Expand All @@ -163,7 +163,6 @@ tokio-util = "0.7.13"
tower = { version = "0.5.2", default-features = false }
tower-http = { version = "0.6.2", default-features = false }
tracing = "0.1.41"
tracing-log = "0.2.0"
tracing-subscriber = { version = "0.3.19", default-features = false }
tracing-test = { version = "0.2.5" }
trybuild = { version = "1.0.103" }
Expand Down
3 changes: 1 addition & 2 deletions crates/rattler_index/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ path = "src/main.rs"
[dependencies]
anyhow = { workspace = true }
clap = { workspace = true, features = ["derive", "env"] }
clap-verbosity-flag = { workspace = true }
clap-verbosity-flag = { workspace = true, features = ["tracing"] }
console = { workspace = true }
fs-err = { workspace = true }
fxhash = { workspace = true }
Expand All @@ -58,7 +58,6 @@ serde_json = { workspace = true }
tokio = { workspace = true, features = ["full"] }
tracing = { workspace = true }
tracing-subscriber = { workspace = true, features = ["env-filter", "fmt"] }
tracing-log = { workspace = true }
url = { workspace = true }

[dev-dependencies]
Expand Down
5 changes: 2 additions & 3 deletions crates/rattler_index/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use clap::{arg, Parser, Subcommand};
use clap_verbosity_flag::Verbosity;
use rattler_conda_types::Platform;
use rattler_index::{index_fs, index_s3};
use tracing_log::AsTrace;
use url::Url;

fn parse_s3_url(value: &str) -> Result<Url, String> {
Expand All @@ -24,7 +23,7 @@ struct Cli {
command: Commands,

#[command(flatten)]
verbose: Verbosity,
verbosity: Verbosity,

/// Whether to force the re-indexing of all packages.
/// Note that this will create a new repodata.json instead of updating the existing one.
Expand Down Expand Up @@ -97,7 +96,7 @@ async fn main() -> anyhow::Result<()> {
let cli = Cli::parse();

tracing_subscriber::FmtSubscriber::builder()
.with_max_level(cli.verbose.log_level_filter().as_trace())
.with_max_level(cli.verbosity)
.init();

match cli.command {
Expand Down
Loading

0 comments on commit c004e15

Please sign in to comment.