Skip to content

Commit 8f3913b

Browse files
committed
deps(workspace): add [patch.crates-io] ndarray → AdaWorldAPI fork (declared intent)
Per user directive 2026-05-28 ("don't use crates.io; just use [patch] to overwrite ndarray = 0.16 with 0.17.2"). Adds: [patch.crates-io] ndarray = { git = "https://github.com/AdaWorldAPI/ndarray.git", branch = "master" } The fork is at `version = "0.17.2"` (verified `/home/user/ndarray/Cargo.toml` + `git ls-remote https://github.com/AdaWorldAPI/ndarray.git` HEAD = 0129b5c8). Workspace-direct ndarray consumers (already path-wired) continue to resolve to 0.17.2 from local source. Observed cargo behavior (verified `cargo check -p lance-graph-ontology`): - Build succeeds in 37s (5 unrelated oxrdf deprecation warnings only). - Cargo emits: `warning: patch ndarray v0.17.2 (...) was not used in the crate graph`. Reason: lance-index 6.0.0 pins `ndarray = "0.16.1"` (with `matrixmultiply-threading`); cargo's `[patch]` requires semver-compat, so the 0.17.2 fork can't replace the 0.16 transitive. - Cargo.lock now has THREE ndarray entries: 1. `ndarray 0.16.1` from `registry+https://github.com/rust-lang/crates.io-index` (lance-index transitive — UNCHANGED). 2. `ndarray 0.17.2` (no source = local path) — workspace-direct. 3. `[[patch.unused]] ndarray 0.17.2` from `git+...?branch=master#0129b5c8` — declared intent, not applied. This patch is therefore a DECLARED INTENT that surfaces the semver gap at every `cargo check` via the "patch unused" warning (the diagnostic codex was asking for). The full unblock still needs either: (a) A `0.16.x`-versioned branch on AdaWorldAPI/ndarray with the fork's patches forward-ported, OR (b) Upstream lance-index to bump to ndarray 0.17. BLOCKED(D) comment in the workspace Cargo.toml updated to reflect this; the TD-NDARRAY-PATCH-0_16 entry filed earlier still tracks the gap. https://claude.ai/code/session_01FMooFcE7hgRWWvknNr2N4i
1 parent 2e001a5 commit 8f3913b

1 file changed

Lines changed: 27 additions & 6 deletions

File tree

Cargo.toml

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,19 @@ resolver = "2"
8888
# workspace-direct consumers. Only the lance TRANSITIVE remains on the
8989
# crates.io 0.16.1.
9090
#
91-
# Resolution paths (none chosen here — see TD-NDARRAY-PATCH-0_16):
92-
# (a) Add a `0.16.x`-versioned branch on AdaWorldAPI/ndarray with the
93-
# AdaWorldAPI patches forward-ported to the 0.16 line, then
94-
# `[patch.crates-io] ndarray = { git = "https://github.com/adaworldapi/ndarray.git", branch = "0.16-fork" }`.
95-
# (b) Wait for upstream lance-index to bump to ndarray 0.17.
96-
# (c) Fork lance-index to use ndarray 0.17 (heavy).
91+
# Attempted resolution (2026-05-28, user directive "just use [patch] to
92+
# overwrite ndarray = 0.16 with 0.17.2"): the `[patch.crates-io]` block
93+
# below points `ndarray` at the AdaWorldAPI fork. Cargo's `[patch]` does
94+
# NOT force a version downgrade — if the fork's `0.17.2` doesn't semver-
95+
# match lance-index's `0.16.1` requirement, cargo emits the warning
96+
# `"Patch ndarray v0.17.2 ... was not used in the crate graph"` and the
97+
# transitive continues to resolve to crates.io 0.16.1 in `Cargo.lock`.
98+
# This patch is therefore a DECLARED INTENT (not a guaranteed effect):
99+
# - It DOES wire workspace-direct ndarray consumers to the fork
100+
# (already wired via the path dep in lance-graph's own Cargo.toml).
101+
# - It DOES NOT guarantee the lance transitive switches off crates.io
102+
# until upstream lance-index supports ndarray 0.17 OR the fork ships
103+
# a `0.16.x`-versioned branch (see TD-NDARRAY-PATCH-0_16).
97104
# Cross-ref: TECH_DEBT.md TD-NDARRAY-PATCH-0_16; PR #425 codex review.
98105
#
99106
# STILL OPEN — BLOCKED(C): `surrealdb` with `kv-lance` feature.
@@ -116,3 +123,17 @@ resolver = "2"
116123
# datafusion = "53" (+ datafusion-common / -expr / -sql /
117124
# -functions-aggregate)
118125
# arrow-array = "58" (+ arrow-schema / -buffer / -ipc / arrow)
126+
127+
# ─── [patch.crates-io] — point ndarray at the AdaWorldAPI fork ──────────────
128+
#
129+
# Per user directive 2026-05-28 ("don't use crates.io; try [patch]
130+
# github.com/adaworldapi/ndarray.git or adjacent" → "just use [patch] to
131+
# overwrite ndarray = 0.16 with 0.17.2"). The fork's `0.17.2` will:
132+
# - Satisfy workspace-direct consumers (already wired via path dep).
133+
# - Emit `"Patch ndarray v0.17.2 ... was not used in the crate graph"`
134+
# against lance-index's `ndarray = "0.16.1"` until lance-index 0.17-
135+
# compat lands OR a 0.16-line branch is added to the fork.
136+
# The patch is a declared-intent override; effect on the transitive depends
137+
# on semver compat. See BLOCKED(D) comment above + TD-NDARRAY-PATCH-0_16.
138+
[patch.crates-io]
139+
ndarray = { git = "https://github.com/AdaWorldAPI/ndarray.git", branch = "master" }

0 commit comments

Comments
 (0)