diff --git a/.cargo-husky/hooks/pre-push b/.cargo-husky/hooks/pre-push index 85499f7c..a923cf52 100755 --- a/.cargo-husky/hooks/pre-push +++ b/.cargo-husky/hooks/pre-push @@ -48,3 +48,6 @@ cargo clippy --workspace --all-targets --all-features -- -D warnings echo "### cargo doc --all-features --no-deps ###" RUSTDOCFLAGS="-D rustdoc::all -A rustdoc::private_intra_doc_links" cargo doc --all-features --no-deps + +echo "### cargo minimal-versions check --direct --all-features ###" +cargo minimal-versions check --direct --all-features --no-dev-deps diff --git a/Cargo.toml b/Cargo.toml index 2382bfca..3e91401d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,11 +30,11 @@ otel = ["dep:opentelemetry", "dep:opentelemetry_sdk", "dep:opentelemetry-otlp", # We only support `toml` configs currently, and one of the default features (`rust-ini`) pulls in a dependency # that breaks the coverage build on nightly. config = { version = "0.14.0", default-features = false, features = ["toml", "convert-case"] } -dotenvy = "0.15.7" +dotenvy = "0.15.5" # Tracing -tracing = { version = "0.1.40", features = ["async-await"] } -tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } +tracing = { workspace = true } +tracing-subscriber = { version = "0.3.17", features = ["env-filter"] } opentelemetry-semantic-conventions = "0.15.0" opentelemetry = { version = "0.23.0", features = ["trace", "metrics", "logs"], optional = true } opentelemetry_sdk = { version = "0.23.0", features = ["tokio", "rt-tokio", "metrics", "logs", "trace"], optional = true } @@ -42,59 +42,56 @@ opentelemetry-otlp = { version = "0.16.0", features = ["metrics", "trace", "logs tracing-opentelemetry = { version = "0.24.0", features = ["metrics"], optional = true } # Controllers -axum = { version = "0.7.5", optional = true } -axum-extra = { version = "0.9.3", features = ["typed-header"], optional = true } +axum = { workspace = true, optional = true } +axum-extra = { version = "0.9.0", features = ["typed-header"], optional = true } tower = { version = "0.4.13", optional = true } -tower-http = { version = "0.5.2", features = ["trace", "timeout", "request-id", "util", "normalize-path", "sensitive-headers", "catch-panic", "compression-full", "decompression-full", "limit"], optional = true } -aide = { version = "0.13.4", features = ["axum", "redoc", "scalar", "macros"], optional = true } -schemars = { version = "0.8.21", optional = true } +tower-http = { version = "0.5.0", features = ["trace", "timeout", "request-id", "util", "normalize-path", "sensitive-headers", "catch-panic", "compression-full", "decompression-full", "limit"], optional = true } +aide = { workspace = true, features = ["axum", "redoc", "scalar", "macros"], optional = true } +schemars = { workspace = true, optional = true } # DB sea-orm = { version = "1.0.0-rc.5", features = ["debug-print", "runtime-tokio-rustls", "sqlx-postgres", "macros"], optional = true } sea-orm-migration = { version = "1.0.0-rc.5", features = ["runtime-tokio-rustls", "sqlx-postgres"], optional = true } # Workers -# Todo: the default `rss-stats` feature has a dependency that currently can't be satisfied (memchr: ~2.3) -rusty-sidekiq = { version = "0.10.5", default-features = false, optional = true } -bb8 = { version = "0.8.3", optional = true } -num_cpus = { version = "1.16.0", optional = true } +rusty-sidekiq = { workspace = true, optional = true } +bb8 = { version = "0.8.0", optional = true } +num_cpus = { version = "1.13.0", optional = true } # Rust async -# Todo: minimize tokio features included in `roadster` -tokio = { version = "1.38.0", features = ["full"] } +tokio = { workspace = true } # For CancellationToken -tokio-util = { version = "0.7.11" } -async-trait = "0.1.80" +tokio-util = { version = "0.7.10" } +async-trait = { workspace = true } # Auth -jsonwebtoken = { version = "9.3.0", optional = true } +jsonwebtoken = { version = "9.0.0", optional = true } # CLI -clap = { version = "4.5.4", features = ["derive", "string"], optional = true } +clap = { workspace = true, features = ["derive", "string"], optional = true } # Others -anyhow = "1.0.86" -serde = "1.0.203" -serde_derive = "1.0.203" +anyhow = { workspace = true } +serde = { workspace = true } +serde_derive = "1.0.184" serde_with = { version = "3.8.1", features = ["macros", "chrono_0_4"] } strum = "0.26.2" strum_macros = "0.26.2" itertools = "0.13.0" -serde_json = "1.0.117" -toml = "0.8.13" -url = { version = "2.5.0", features = ["serde"] } -uuid = { version = "1.8.0", features = ["v4", "serde"] } -futures-core = "0.3.30" -chrono = { version = "0.4.38", features = ["serde"] } -byte-unit = { version = "5.1.4", features = ["serde"] } +serde_json = "1.0.85" +toml = "0.8.0" +url = { version = "2.2.2", features = ["serde"] } +uuid = { version = "1.1.2", features = ["v4", "serde"] } +futures = "0.3.19" +futures-core = "0.3.19" +chrono = { version = "0.4.34", features = ["serde"] } +byte-unit = { version = "5.0.0", features = ["serde"] } convert_case = "0.6.0" -const_format = "0.2.32" -typed-builder = "0.18.2" -num-traits = "0.2.19" -log = "0.4.21" -futures = "0.3.30" -validator = { version = "0.18.1", features = ["derive"] } -thiserror = "1.0.61" +const_format = "0.2.0" +typed-builder = "0.18.0" +num-traits = "0.2.14" +validator = { version = "0.18.0", features = ["derive"] } +thiserror = "1.0.35" # Add latest version of `time` to resolve a build error on nightly # https://github.com/time-rs/time/issues/681 time = "0.3.36" @@ -109,6 +106,21 @@ rstest = "0.20.0" [workspace] members = [".", "examples/*"] +[workspace.dependencies] +# Todo: minimize tokio features included in `roadster` +tokio = { version = "1.28.0", features = ["full"] } +anyhow = "1.0.46" +tracing = { version = "0.1.40", features = ["async-await"] } +async-trait = "0.1.74" +aide = { version = "0.13.4", features = ["axum"] } +axum = "0.7.4" +schemars = "0.8.16" +clap = { version = "4.3.0", features = ["derive"] } + +# Todo: the default `rss-stats` feature has a dependency that currently can't be satisfied (memchr: ~2.3) +rusty-sidekiq = { version = "0.10.5", default-features = false } +serde = { version = "1.0.184", features = ["derive"] } + [package.metadata.docs.rs] # Have docs.rs pass `--all-features` to ensure all features have their documentation built. all-features = true diff --git a/examples/minimal/Cargo.toml b/examples/minimal/Cargo.toml index d7cd80a1..906ba836 100644 --- a/examples/minimal/Cargo.toml +++ b/examples/minimal/Cargo.toml @@ -8,25 +8,22 @@ publish = false [dependencies] roadster = { version = "0.2", path = "../.." } -tokio = { version = "1.38.0", features = ["full"] } -anyhow = "1.0.86" -tracing = { version = "0.1.40", features = ["async-await"] } -async-trait = "0.1.80" -aide = { version = "0.13.4", features = ["axum"] } -axum = "0.7.5" -schemars = "0.8.21" +tokio = { workspace = true } +anyhow = { workspace = true } +tracing = { workspace = true } +async-trait = { workspace = true } +aide = { workspace = true } +axum = { workspace = true } +schemars = { workspace = true } # DB entity = { path = "entity" } migration = { path = "migration" } -clap = { version = "4.5.4", features = ["derive"] } +clap = { version = "4.3.0", features = ["derive"] } # The default `rss-stats` feature has a dependency that currently can't be satisfied (memchr: ~2.3) rusty-sidekiq = { version = "0.10.5", default-features = false } -serde = { version = "1.0.203", features = ["derive"] } - -[dev-dependencies] -cargo-husky = { version = "1.5.0", features = ["default", "run-cargo-check", "run-cargo-clippy", "run-cargo-fmt", "run-cargo-test"] } +serde = { version = "1.0.184", features = ["derive"] } [[bin]] name = "minimal" diff --git a/examples/minimal/migration/Cargo.toml b/examples/minimal/migration/Cargo.toml index e82fa557..242da68e 100644 --- a/examples/minimal/migration/Cargo.toml +++ b/examples/minimal/migration/Cargo.toml @@ -9,7 +9,7 @@ name = "migration" path = "src/lib.rs" [dependencies] -tokio = { version = "1.38.0", features = ["full"] } +tokio = { workspace = true } [dependencies.sea-orm-migration] version = "1.0.0-rc.5"