Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ jobs:

- uses: taiki-e/install-action@v2
with:
tool: just,fd-find,cargo-machete,cargo-udeps
tool: just,fd-find,cargo-machete,cargo-udeps,cargo-sort

- name: restore build & cargo cache
uses: Swatinem/rust-cache@v2
Expand Down
15 changes: 6 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
[workspace]
resolver = "2"

members = [
"crates/bin/*",
"crates/lib/*",
]
members = ["crates/bin/*", "crates/lib/*"]

default-members = [
"crates/bin/docs_rs_admin",
"crates/bin/docs_rs_builder",
"crates/bin/docs_rs_watcher",
"crates/bin/docs_rs_web",
"crates/bin/docs_rs_admin",
"crates/bin/docs_rs_builder",
"crates/bin/docs_rs_watcher",
"crates/bin/docs_rs_web",
]

exclude = [
Expand All @@ -23,7 +20,7 @@ exclude = [
]

[workspace.dependencies]
anyhow = { version = "1.0.42", features = ["backtrace"]}
anyhow = { version = "1.0.42", features = ["backtrace"] }
askama = "0.15.1"
async-stream = "0.3.5"
axum-extra = { version = "0.12.0", features = ["typed-header", "routing", "middleware"] }
Expand Down
4 changes: 2 additions & 2 deletions crates/bin/docs_rs_builder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ docs_rs_config = { path = "../../lib/docs_rs_config" }
docs_rs_context = { path = "../../lib/docs_rs_context" }
docs_rs_database = { path = "../../lib/docs_rs_database" }
docs_rs_env_vars = { path = "../../lib/docs_rs_env_vars" }
docs_rs_fastly= { path = "../../lib/docs_rs_fastly" }
docs_rs_fastly = { path = "../../lib/docs_rs_fastly" }
docs_rs_logging = { path = "../../lib/docs_rs_logging" }
docs_rs_opentelemetry = { path = "../../lib/docs_rs_opentelemetry" }
docs_rs_registry_api = { path = "../../lib/docs_rs_registry_api" }
Expand Down Expand Up @@ -45,7 +45,7 @@ docs_rs_build_queue = { path = "../../lib/docs_rs_build_queue", features = ["tes
docs_rs_config = { path = "../../lib/docs_rs_config", features = ["testing"] }
docs_rs_context = { path = "../../lib/docs_rs_context", features = ["testing"] }
docs_rs_database = { path = "../../lib/docs_rs_database", features = ["testing"] }
docs_rs_fastly= { path = "../../lib/docs_rs_fastly", features = ["testing"] }
docs_rs_fastly = { path = "../../lib/docs_rs_fastly", features = ["testing"] }
docs_rs_headers = { path = "../../lib/docs_rs_headers", features = ["testing"] }
docs_rs_storage = { path = "../../lib/docs_rs_storage", features = ["testing"] }
docs_rs_types = { path = "../../lib/docs_rs_types", features = ["testing"] }
Expand Down
2 changes: 1 addition & 1 deletion crates/bin/docs_rs_watcher/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ edition = "2024"
anyhow = { workspace = true }
clap = { workspace = true }
crates-index = { version = "3.0.0", default-features = false, features = ["git", "git-https", "git-performance", "parallel"] }
crates-index-diff = { version = "29.0.0", features = [ "max-performance" ]}
crates-index-diff = { version = "29.0.0", features = [ "max-performance" ] }
docs_rs_build_queue = { path = "../../lib/docs_rs_build_queue" }
docs_rs_config = { path = "../../lib/docs_rs_config" }
docs_rs_context = { path = "../../lib/docs_rs_context" }
Expand Down
15 changes: 8 additions & 7 deletions crates/bin/docs_rs_web/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ repository = "https://github.com/rust-lang/docs.rs"
edition = "2024"
build = "build.rs"

[package.metadata.cargo-machete]
ignored = [
"phf",
# used in build script output
"slug", # used in askama templates, can be moved to web binary
]

[dependencies]
anyhow = { workspace = true }
askama = { workspace = true }
Expand Down Expand Up @@ -64,7 +71,7 @@ toml = { workspace = true }
tower = "0.5.1"
tower-http = { version = "0.6.0", features = ["fs", "trace", "timeout", "catch-panic"] }
tracing = { workspace = true }
tracing-futures= { version = "0.2.5", features = ["std-future", "futures-03"] }
tracing-futures = { version = "0.2.5", features = ["std-future", "futures-03"] }
url = { workspace = true }

[build-dependencies]
Expand Down Expand Up @@ -93,9 +100,3 @@ pretty_assertions = { workspace = true }
test-case = { workspace = true }
walkdir = { workspace = true }

[package.metadata.cargo-machete]
ignored = [
"phf", # used in build script output
"slug", # used in askama templates, can be moved to web binary
]

4 changes: 2 additions & 2 deletions crates/lib/docs_rs_build_limits/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ docs_rs_config = { path = "../docs_rs_config" }
docs_rs_env_vars = { path = "../docs_rs_env_vars" }
docs_rs_types = { path = "../docs_rs_types" }
futures-util = { workspace = true }
serde = { workspace = true}
serde = { workspace = true }
sqlx = { workspace = true }
tracing = { workspace = true }
thiserror = { workspace = true }
tracing = { workspace = true }

[dev-dependencies]
docs_rs_database = { path = "../docs_rs_database", features = ["testing"] }
Expand Down
20 changes: 10 additions & 10 deletions crates/lib/docs_rs_build_queue/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ license = "MIT"
repository = "https://github.com/rust-lang/docs.rs"
edition = "2024"

[features]
testing = [
"docs_rs_config/testing",
"docs_rs_database/testing",
"docs_rs_opentelemetry/testing",
"docs_rs_types/testing",
]

[dependencies]
anyhow = { workspace = true }
chrono = { workspace = true }
Expand All @@ -20,16 +28,8 @@ tokio = { workspace = true }
tracing = { workspace = true }

[dev-dependencies]
docs_rs_opentelemetry = { path = "../docs_rs_opentelemetry", features = ["testing"] }
docs_rs_database = { path = "../docs_rs_database", features = ["testing"] }
docs_rs_utils = { path = "../../lib/docs_rs_utils", features = ["testing"] }
docs_rs_opentelemetry = { path = "../docs_rs_opentelemetry", features = ["testing"] }
docs_rs_types = { path = "../docs_rs_types", features = ["testing"] }
docs_rs_utils = { path = "../../lib/docs_rs_utils", features = ["testing"] }
pretty_assertions = { workspace = true }

[features]
testing = [
"docs_rs_config/testing",
"docs_rs_database/testing",
"docs_rs_opentelemetry/testing",
"docs_rs_types/testing",
]
6 changes: 3 additions & 3 deletions crates/lib/docs_rs_cargo_metadata/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ license = "MIT"
repository = "https://github.com/rust-lang/docs.rs"
edition = "2024"

[features]
testing = []

[dependencies]
anyhow = { workspace = true }
derive_more = { workspace = true }
Expand All @@ -14,6 +17,3 @@ serde_json = { workspace = true }

[dev-dependencies]
test-case = { workspace = true }

[features]
testing = []
6 changes: 3 additions & 3 deletions crates/lib/docs_rs_config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name = "docs_rs_config"
version = "0.1.0"
edition = "2024"

[dependencies]
anyhow = { workspace = true }

[features]
testing = []

[dependencies]
anyhow = { workspace = true }

20 changes: 10 additions & 10 deletions crates/lib/docs_rs_context/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ license = "MIT"
repository = "https://github.com/rust-lang/docs.rs"
edition = "2024"

[features]
testing = [
"dep:docs_rs_logging",
"dep:docs_rs_test_fakes",
"docs_rs_database/testing",
"docs_rs_fastly/testing",
"docs_rs_logging/testing",
"docs_rs_storage/testing",
]

[dependencies]
anyhow = { workspace = true }
bon = { workspace = true }
Expand All @@ -20,13 +30,3 @@ docs_rs_repository_stats = { path = "../docs_rs_repository_stats" }
docs_rs_storage = { path = "../docs_rs_storage" }
docs_rs_test_fakes = { path = "../docs_rs_test_fakes", optional = true }
tokio = { workspace = true }

[features]
testing = [
"dep:docs_rs_logging",
"dep:docs_rs_test_fakes",
"docs_rs_database/testing",
"docs_rs_fastly/testing",
"docs_rs_logging/testing",
"docs_rs_storage/testing",
]
20 changes: 10 additions & 10 deletions crates/lib/docs_rs_database/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,21 @@ repository = "https://github.com/rust-lang/docs.rs"
edition = "2024"
build = "build.rs"

[features]
testing = [
"dep:rand",
"docs_rs_config/testing",
"docs_rs_opentelemetry/testing",
]

[dependencies]
anyhow = { workspace = true }
chrono = { workspace = true }
docs_rs_config = { path = "../docs_rs_config" }
docs_rs_cargo_metadata = { path = "../docs_rs_cargo_metadata" }
docs_rs_config = { path = "../docs_rs_config" }
docs_rs_env_vars = { path = "../docs_rs_env_vars" }
docs_rs_opentelemetry = { path = "../docs_rs_opentelemetry" }
docs_rs_registry_api= { path = "../docs_rs_registry_api" }
docs_rs_registry_api = { path = "../docs_rs_registry_api" }
docs_rs_types = { path = "../docs_rs_types" }
docs_rs_utils = { path = "../docs_rs_utils" }
futures-util = { workspace = true }
Expand All @@ -31,17 +38,10 @@ tokio = { workspace = true }
tracing = { workspace = true }

[dev-dependencies]
docs_rs_config = { path = "../docs_rs_config", features = ["testing"] }
docs_rs_cargo_metadata = { path = "../docs_rs_cargo_metadata", features = ["testing"] }
docs_rs_config = { path = "../docs_rs_config", features = ["testing"] }
docs_rs_opentelemetry = { path = "../docs_rs_opentelemetry", features = ["testing"] }
docs_rs_types = { path = "../docs_rs_types", features = ["testing"] }
rand = { workspace = true }
tempfile = { workspace = true }
test-case = { workspace = true }

[features]
testing = [
"dep:rand",
"docs_rs_config/testing",
"docs_rs_opentelemetry/testing",
]
6 changes: 3 additions & 3 deletions crates/lib/docs_rs_fastly/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ license = "MIT"
repository = "https://github.com/rust-lang/docs.rs"
edition = "2024"

[features]
testing = ["dep:tokio"]

[dependencies]
anyhow = { workspace = true }
chrono = { workspace = true }
Expand All @@ -28,6 +31,3 @@ docs_rs_headers = { path = "../docs_rs_headers", features = ["testing"] }
docs_rs_opentelemetry = { path = "../docs_rs_opentelemetry", features = ["testing"] }
mockito = { workspace = true }
tokio = { workspace = true }

[features]
testing = ["dep:tokio"]
6 changes: 3 additions & 3 deletions crates/lib/docs_rs_headers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ license = "MIT"
repository = "https://github.com/rust-lang/docs.rs"
edition = "2024"

[features]
testing = []

[dependencies]
anyhow = { workspace = true }
askama = { workspace = true }
Expand All @@ -23,6 +26,3 @@ axum-extra = { workspace = true }
serde_json = { workspace = true }
test-case = { workspace = true }
tokio = { workspace = true }

[features]
testing = []
6 changes: 3 additions & 3 deletions crates/lib/docs_rs_logging/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ license = "MIT"
repository = "https://github.com/rust-lang/docs.rs"
edition = "2024"

[features]
testing = []

[dependencies]
anyhow = { workspace = true }
docs_rs_utils = { path = "../docs_rs_utils" }
sentry = { workspace = true }
tracing = { workspace = true }
tracing-subscriber = { version = "0.3.20", default-features = false, features = ["ansi", "fmt", "json", "env-filter", "tracing-log"] }

[features]
testing = []
2 changes: 1 addition & 1 deletion crates/lib/docs_rs_mimes/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ repository = "https://github.com/rust-lang/docs.rs"
edition = "2024"

[dependencies]
mime_guess = "2"
mime = { workspace = true }
mime_guess = "2"

[dev-dependencies]
test-case = { workspace = true }
14 changes: 7 additions & 7 deletions crates/lib/docs_rs_opentelemetry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ license = "MIT"
repository = "https://github.com/rust-lang/docs.rs"
edition = "2024"

[features]
testing = [
"dep:derive_more",
"docs_rs_config/testing",
"opentelemetry_sdk/testing",
]

[dependencies]
anyhow = { workspace = true }
derive_more = { workspace = true, optional = true }
Expand All @@ -16,10 +23,3 @@ opentelemetry-resource-detectors = "0.10.0"
opentelemetry_sdk = { workspace = true }
tracing = { workspace = true }
url = { workspace = true }

[features]
testing = [
"dep:derive_more",
"docs_rs_config/testing",
"opentelemetry_sdk/testing",
]
2 changes: 1 addition & 1 deletion crates/lib/docs_rs_repository_stats/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ edition = "2024"
anyhow = { workspace = true }
async-trait = "0.1.89"
chrono = { workspace = true }
docs_rs_config = { path = "../docs_rs_config" }
docs_rs_cargo_metadata = { path = "../docs_rs_cargo_metadata" }
docs_rs_config = { path = "../docs_rs_config" }
docs_rs_database = { path = "../docs_rs_database" }
docs_rs_env_vars = { path = "../docs_rs_env_vars" }
docs_rs_utils = { path = "../docs_rs_utils" }
Expand Down
20 changes: 10 additions & 10 deletions crates/lib/docs_rs_storage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ license = "MIT"
repository = "https://github.com/rust-lang/docs.rs"
edition = "2024"

[features]
testing = [
"dep:rand",
"dep:docs_rs_logging",
"docs_rs_config/testing",
"docs_rs_logging/testing",
"docs_rs_opentelemetry/testing",
]

[dependencies]
anyhow = { workspace = true }
async-compression = { version = "0.4.32", features = ["tokio", "bzip2", "zstd", "gzip"] }
Expand Down Expand Up @@ -39,7 +48,7 @@ thiserror = { workspace = true }
tokio = { workspace = true }
tracing = { workspace = true }
walkdir = { workspace = true }
zip = {version = "7.0.0", default-features = false, features = ["bzip2"]}
zip = { version = "7.0.0", default-features = false, features = ["bzip2"] }
zstd = "0.13.0"

[dev-dependencies]
Expand All @@ -50,15 +59,6 @@ docs_rs_opentelemetry = { path = "../docs_rs_opentelemetry", features = ["testin
rand = { workspace = true }
test-case = { workspace = true }

[features]
testing = [
"dep:rand",
"dep:docs_rs_logging",
"docs_rs_config/testing",
"docs_rs_logging/testing",
"docs_rs_opentelemetry/testing",
]

[[bench]]
name = "compression"
harness = false
Loading
Loading