2026-06-04 13:28:33 +00:00
|
|
|
# Runtime Patches
|
|
|
|
|
|
|
|
|
|
This directory documents temporary patches for third-party Rust dependencies.
|
|
|
|
|
|
2026-09-18 12:48:02 +00:00
|
|
|
## permutation_iterator
|
2026-06-04 13:28:33 +00:00
|
|
|
|
2026-09-18 12:48:02 +00:00
|
|
|
`qdrant-edge` depends on `permutation_iterator 0.1.2`, and that crate has seen no release since
|
|
|
|
|
2019. Its published version pulls in an outdated `rand` line, which drags a second copy of the
|
|
|
|
|
whole `rand` family into our dependency tree: `rand 0.7.3`, `rand_core 0.5.1`, `rand_chacha 0.2`,
|
|
|
|
|
`rand_hc`, `getrandom 0.1.16`, `wasi 0.9` and `cfg-if 0.1`, next to the current ones everything
|
|
|
|
|
else uses.
|
2026-06-04 13:28:33 +00:00
|
|
|
|
2026-09-18 12:48:02 +00:00
|
|
|
The fork `SommerEngineering/permutation-iterator-rs` is the published 0.1.2 with `rand` raised to
|
|
|
|
|
0.8, so it still satisfies what `qdrant-edge` asks for. AI Studio pins it in `runtime/Cargo.toml`:
|
2026-06-04 13:28:33 +00:00
|
|
|
|
2026-09-18 12:48:02 +00:00
|
|
|
```toml
|
|
|
|
|
[patch.crates-io]
|
|
|
|
|
permutation_iterator = { git = "https://github.com/SommerEngineering/permutation-iterator-rs.git", rev = "..." }
|
2026-06-04 13:28:33 +00:00
|
|
|
```
|
|
|
|
|
|
2026-09-18 12:48:02 +00:00
|
|
|
The same change was offered upstream in
|
|
|
|
|
[asimihsan/permutation-iterator-rs#14](https://github.com/asimihsan/permutation-iterator-rs/pull/14),
|
|
|
|
|
where it has been waiting since 2021. This is tree hygiene, not a build failure: without the patch
|
|
|
|
|
the runtime still builds, it just carries the old `rand` family along.
|
2026-06-04 13:28:33 +00:00
|
|
|
|
2026-09-18 12:48:02 +00:00
|
|
|
### When this patch can go
|
2026-06-04 13:28:33 +00:00
|
|
|
|
2026-09-18 12:48:02 +00:00
|
|
|
Either of these is enough, and both are worth a look whenever `qdrant-edge` is updated:
|
2026-06-04 13:28:33 +00:00
|
|
|
|
2026-09-18 12:48:02 +00:00
|
|
|
- crates.io carries a `permutation_iterator` newer than 0.1.2 which uses a current `rand`. Then the
|
|
|
|
|
`[patch.crates-io]` entry goes, and `qdrant-edge`'s own requirement decides the version.
|
|
|
|
|
- `qdrant-edge` stops depending on `permutation_iterator` at all. Check with
|
|
|
|
|
`cargo tree -i permutation_iterator` after the update.
|
2026-06-04 13:28:33 +00:00
|
|
|
|
2026-09-18 12:48:02 +00:00
|
|
|
Afterward, `grep 'name = "rand"' -A 2 runtime/Cargo.lock` must not show a 0.7 version anymore.
|
|
|
|
|
`SommerEngineering/permutation-iterator-rs` can then be deleted.
|