In the past it seems as though all the wasmtime dependencies have been released in lockstep, though in this case I've noticed that the most recent version of wasmtime (0.40.0) isn't compatible with the most recent version of system-interface (0.22.0), because wasmtime has a transitive dependency on system-interface v0.21.0 via wasi-cap-std-sync. Is that intentional?
Can you say more about what you're seeing? Wasmtime doesn't insist that all its dependencies release in lockstep: thiserror, memfd, etc.
The current situation is: if a user of Wasmtime separately depends on system-interface 0.22, they'll get two versions of system-interface. https://github.com/bytecodealliance/wasmtime/pull/4776 is an open PR which updates Wasmtime to system-interface 0.22, so when that lands and is released, this problem will go away. Until then, they can either just accept having multiple versions, or just continue to use 0.21.
Dan Gohman said:
Can you say more about what you're seeing? Wasmtime doesn't insist that all its dependencies release in lockstep: thiserror, memfd, etc.
In our case, while upgrading to wasmtime 0.40 we can't also update to system-interface 0.22 because we get "expected struct system_interface::fs::fd_flags::FdFlags
, found struct system_interface::fs::FdFlags
" due to the version mismatch. Which is fine, because it seems like we can just stick with system-interface 0.21 for now (although dependabot still pesters us to upgrade). I just thought it was curious and wondered if perhaps it was a case of forgetting to bump the version in wasi-cap-std-sync.
bstrie has marked this topic as resolved.
This sounds like maybe wasi-cap-std-sync should be re-exporting types like FdFlags
instead of requiring callers to pull in system-interface
and keep its version in sync. Am I missing something?
@Jamey Sharp agreed, almost always better to re-export than to make devs juggle versions themselves
I agree, I'll look into whether we can do that for wasi-cap-std-sync.
Ok, yeah. So wasi_common already does have its own FdFlags
, so that system-interface isn't visible in the public API, and wasi-cap-std-sync does use that in most places. But it appears there are a few places where the system-interface dependency is exposed.
I've now submitted a PR making system-interface a private dependency: https://github.com/bytecodealliance/wasmtime/pull/4784
@bstrie From some searching, the one place I found where this issue comes up is here in the enarx repo. I've now posted a Wasmtime PR #4784, and if I haven't missed anything, should allow you to remove the system-interface dependency from enarx and just use the provided get_fd_flags
and is_read_write
provided by wasi-cap-std-sync on your filelike types.
Last updated: Dec 23 2024 at 12:05 UTC