[stable-1.19.x] deps: fix vm-memory version conflict when used as a Rust dependency#728
Conversation
|
I can confirm locally vendoring and patching |
|
I think we should wait for a new release of linux-loader and then update our crates to be at 0.18.0 instead. |
We'll need to also wait for rust-vmm/vhost#348 |
|
Given that the project is hardly usable without, an interim patch release would be very appreciated. |
Hm... that one is going to take longer. OK, what do you think about retargeting this change for |
This project has existed for years before even having a release on crates.io, and I think many people have found it usable. |
I think that's a good compromise. I'll get around to it today |
When libkrun is added as a Rust crate dependency, Cargo resolves two incompatible versions of vm-memory (0.17.1 and 0.18.0), causing compilation failures. The root cause is imago's wide vm-memory constraint (>=0.16, <0.19) which lets Cargo pick 0.18.0 for imago while everything else resolves to 0.17.1. Within the workspace this is hidden by Cargo.lock, but external consumers don't inherit it. Drop imago's vm-memory feature and manually convert VolatileSlice to IoVector/IoVectorMut using ptr_guard()/ptr_guard_mut(). Pin all vm-memory dependencies to =0.17.1 to prevent version splits from newly published semver-compatible releases (e.g., 0.17.2). Assisted-by: Claude Code: claude-opus-4-6[1m] Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
bb12143 to
ad3f445
Compare
Should be set now |
|
thanks @jakecorrenti ! |
When libkrun is added as a Rust crate dependency, Cargo resolves two incompatible versions of vm-memory (0.17.1 and 0.18.0), causing compilation failures. The root cause is imago's wide vm-memory constraint (>=0.16, <0.19) which lets Cargo pick 0.18.0 for imago while everything else resolves to 0.17.1. Within the workspace this is hidden by Cargo.lock, but external consumers don't inherit it.
Drop imago's vm-memory feature and manually convert VolatileSlice to IoVector/IoVectorMut using ptr_guard()/ptr_guard_mut(). Pin all vm-memory dependencies to =0.17.1 to prevent version splits from newly published semver-compatible releases (e.g., 0.17.2).
Fixes: #726