mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-24 21:13:48 +00:00
Removed the patch of permutation_iterator
This commit is contained in:
3 files changed
-47
No files matched your search
Generated
-5
@@ -10084,8 +10084,3 @@ dependencies = [
|
|||||||
"syn 3.0.10",
|
"syn 3.0.10",
|
||||||
"winnow 1.0.5",
|
"winnow 1.0.5",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[patch.unused]]
|
|
||||||
name = "permutation_iterator"
|
|
||||||
version = "0.1.2"
|
|
||||||
source = "git+https://github.com/SommerEngineering/permutation-iterator-rs.git?rev=76836ed316d18dfef530ba908f58481c343e80d7#76836ed316d18dfef530ba908f58481c343e80d7"
|
|
||||||
@@ -105,12 +105,6 @@ tokenizers = "0.23.2"
|
|||||||
# Sends requests through the runtime API router in tests, without starting a server.
|
# Sends requests through the runtime API router in tests, without starting a server.
|
||||||
tower = { version = "0.5.3", features = ["util"] }
|
tower = { version = "0.5.3", features = ["util"] }
|
||||||
|
|
||||||
[patch.crates-io]
|
|
||||||
# Issue: This repo was not updated since 2020. The rand crate was outdated. We patched it to use a newer version of rand.
|
|
||||||
# State: There is a PR for a long time, but it was not merged. We use the git version for now. Qdrant Edge still depends
|
|
||||||
# on this crate in version 0.1.2, so the patch stays relevant: https://github.com/asimihsan/permutation-iterator-rs/pull/14
|
|
||||||
permutation_iterator = { git = "https://github.com/SommerEngineering/permutation-iterator-rs.git", rev = "76836ed316d18dfef530ba908f58481c343e80d7" }
|
|
||||||
|
|
||||||
[target.'cfg(target_os = "windows")'.dependencies]
|
[target.'cfg(target_os = "windows")'.dependencies]
|
||||||
windows-registry = "0.6.1"
|
windows-registry = "0.6.1"
|
||||||
windows-native-keyring-store = "1.1.0"
|
windows-native-keyring-store = "1.1.0"
|
||||||
|
|||||||
@@ -1,36 +0,0 @@
|
|||||||
# Runtime Patches
|
|
||||||
|
|
||||||
This directory documents temporary patches for third-party Rust dependencies.
|
|
||||||
|
|
||||||
## permutation_iterator
|
|
||||||
|
|
||||||
`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.
|
|
||||||
|
|
||||||
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`:
|
|
||||||
|
|
||||||
```toml
|
|
||||||
[patch.crates-io]
|
|
||||||
permutation_iterator = { git = "https://github.com/SommerEngineering/permutation-iterator-rs.git", rev = "..." }
|
|
||||||
```
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
### When this patch can go
|
|
||||||
|
|
||||||
Either of these is enough, and both are worth a look whenever `qdrant-edge` is updated:
|
|
||||||
|
|
||||||
- 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.
|
|
||||||
|
|
||||||
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.
|
|
||||||
Reference in new issue
Block a user