Repository navigation
Error while vendoring tantivy-binding dependencies to build Milvus #55078
|
Hello, I noticed that two versions of This broke our offline reproducible build of Milvus because it's not possible to run [2026-10-27 07:47:25] INFO - 2026-10-27T06:47:25.147585Z ERROR obs_service_cargo::cli: err=Custom { kind: Interrupted, error: "error: failed to sync\n\nCaused by:\n found duplicate version of package `rust-stemmers v1.2.0` vendored from two sources:\n\n \tsource 1: https://github.com/milvus-io/rust-stemmers.git?rev=3b2545218f76e797baecbf91fa1cbd2c0db60726#3b254521\n \tsource 2: https://github.com/milvus-io/rust-stemmers.git#3b254521\n" }
[2026-10-27 07:47:25] INFO - 2026-10-27T06:47:25.152912Z ERROR cargo_vendor: error: failed to sync
[2026-10-27 07:47:25] INFO -
[2026-10-27 07:47:25] INFO - Caused by:
[2026-10-27 07:47:25] INFO - found duplicate version of package `rust-stemmers v1.2.0` vendored from two sources:
[2026-10-27 07:47:25] INFO -
[2026-10-27 07:47:25] INFO - source 1: https://github.com/milvus-io/rust-stemmers.git?rev=3b2545218f76e797baecbf91fa1cbd2c0db60726#3b254521
[2026-10-27 07:47:25] INFO - source 2: https://github.com/milvus-io/rust-stemmers.git#3b254521
[2026-10-27 07:47:25] INFO -
[2026-10-27 07:47:25] INFO - Error: Custom { kind: Interrupted, error: "error: failed to sync\n\nCaused by:\n found duplicate version of package `rust-stemmers v1.2.0` vendored from two sources:\n\n \tsource 1: https://github.com/milvus-io/rust-stemmers.git?rev=3b2545218f76e797baecbf91fa1cbd2c0db60726#3b254521\n \tsource 2: https://github.com/milvus-io/rust-stemmers.git#3b254521\n" }
[2026-10-27 07:47:25] INFO - Command exited with return code 1Which version should be used, Thank you in advance. |
Replies: 1 comment 1 reply
|
You need both, actually. 1.2.0 and 1.3.0 aren't the conflict:
Cargo treats those as two different packages, and I reproduced your error on the -rust-stemmers = { git = "https://github.com/milvus-io/rust-stemmers.git", rev = "3b2545218f76e797baecbf91fa1cbd2c0db60726" }
+rust-stemmers = { git = "https://github.com/milvus-io/rust-stemmers.git" }Then For an offline build you could carry that as a small patch. Upstream, the cleaner fix is to make the direct dependency and the tantivy fork specify the git source the same way (both with |
You need both, actually. 1.2.0 and 1.3.0 aren't the conflict:
cargo vendorputs them inrust-stemmers-1.2.0andrust-stemmers-1.3.0without trouble. The problem is that 1.2.0 is inCargo.locktwice, from the same commit but with two different source strings:tantivy-bindingdepends on it directly withrev = "3b25452..."→git+...rust-stemmers.git?rev=3b25452...#3b25452...tantivy-5(0.21.1-fix4) fork depends on it as a plain git dependency →git+...rust-stemmers.git#3b25452...Cargo treats those as two different packages, and
cargo vendorrefuses to put two packages with the same name and version into one directory. Tantivy 0.23 uses 1.3.0 (rev = ac4aee9...), which is unrelated.I r…