mirror of
https://github.com/lancedb/lancedb.git
synced 2026-08-24 15:08:52 +00:00
chore: enforce shared workspace dependencies via cargo-deny (#3975)
`cargo deny` did not check crate-level dependency declarations against `[workspace.dependencies]`, so a crate used by both the core crate and the bindings could be declared independently in each one and drift. For example `tokio` was pinned at `1.23` in `rust/lancedb` and `1.40` in `python`, and `pin-project` at `1.0.7` in the workspace table but `1.1.5` in `python`. This PR turns on cargo-deny's `bans.workspace-dependencies` lint, which fails when a dependency is used by more than one member without going through `workspace = true`, and when a `[workspace.dependencies]` entry is used by nobody. Enabling it surfaced 12 violations. Fixing them means adding `bytes`, `lancedb`, `serde`, `serde_json`, `tempfile`, `tokio`, and `uuid` to `[workspace.dependencies]`, and pointing the `arrow`, `arrow-buffer`, `async-trait`, `chrono`, and `pin-project` declarations at the entries that already existed. `Cargo.lock` is unchanged, so resolution is the same as before. The shared `chrono` entry now carries `default-features = false, features = ["clock"]`, matching what `nodejs` and `python` already asked for — cargo ignores a member's `default-features = false` unless the workspace entry sets it too. On the targets we build, `clock` covers everything `rust/lancedb` was getting from chrono's defaults. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
+4
-4
@@ -16,12 +16,12 @@ crate-type = ["cdylib"]
|
||||
async-trait.workspace = true
|
||||
arrow-ipc.workspace = true
|
||||
arrow-array.workspace = true
|
||||
arrow-buffer = "58.0.0"
|
||||
arrow-buffer.workspace = true
|
||||
half.workspace = true
|
||||
arrow-schema.workspace = true
|
||||
env_logger.workspace = true
|
||||
futures.workspace = true
|
||||
lancedb = { path = "../rust/lancedb", default-features = false }
|
||||
lancedb.workspace = true
|
||||
lance-namespace.workspace = true
|
||||
napi = { version = "3.8.3", default-features = false, features = [
|
||||
"napi9",
|
||||
@@ -29,8 +29,8 @@ napi = { version = "3.8.3", default-features = false, features = [
|
||||
"chrono_date",
|
||||
"serde-json",
|
||||
] }
|
||||
chrono = { version = "0.4", default-features = false, features = ["clock"] }
|
||||
serde_json = "1"
|
||||
chrono.workspace = true
|
||||
serde_json.workspace = true
|
||||
napi-derive = "3.5.2"
|
||||
# Prevent dynamic linking of lzma, which comes from datafusion
|
||||
lzma-sys = { version = "0.1", features = ["static"] }
|
||||
|
||||
Reference in New Issue
Block a user