Stream: git-wasmtime

Topic: wasmtime / PR #14107 fix(wasmtime-cli): generic eio error...


view this post on Zulip Wasmtime GitHub notifications bot (Aug 10 2026 at 19:14):

eduardomourar opened PR #14107 from eduardomourar:fix/wasmtime-cli-generic-eio to bytecodealliance:main:

Fixes: #14061

view this post on Zulip Wasmtime GitHub notifications bot (Aug 10 2026 at 19:14):

eduardomourar requested dicej for a review on PR #14107.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 10 2026 at 19:14):

eduardomourar requested wasmtime-wasi-reviewers for a review on PR #14107.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 10 2026 at 19:16):

eduardomourar edited PR #14107:

Fixes: #14061.

Map BrokenPipe to StreamError::Closed in the wasip2 CLI stdout/stdin paths, and preserve the original std::io::Error in LastOperationFailed for all other errors (EISDIR, etc.) so they remain recoverable via filesystem_error_code.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 10 2026 at 19:16):

eduardomourar edited PR #14107.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 10 2026 at 19:42):

:memo: dicej submitted PR review:

Thanks!

view this post on Zulip Wasmtime GitHub notifications bot (Aug 10 2026 at 19:42):

:speech_balloon: dicej created PR review comment:

Could we combine this with stream_error_from and move it up to the parent module so it can be used both here and in stdout.rs? Likewise the duplicate broken_pipe_maps_to_closed and is_a_directory_preserves_io_error tests could be moved and combined.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 10 2026 at 19:43):

:thumbs_up: alexcrichton submitted PR review:

Thanks! Unit tests where they are right now are often pretty brittle, so would you be up for adding more integration-style tests for this? For example extending tests/all/cli_tests.rs and adding guest programs to crates/test-programs/src/bin/*?

view this post on Zulip Wasmtime GitHub notifications bot (Aug 10 2026 at 19:43):

alexcrichton commented on PR #14107:

oh disregard me, sorry I defer to @dicej

view this post on Zulip Wasmtime GitHub notifications bot (Aug 10 2026 at 19:58):

eduardomourar commented on PR #14107:

Thanks! Unit tests where they are right now are often pretty brittle, so would you be up for adding more integration-style tests for this? For example extending tests/all/cli_tests.rs and adding guest programs to crates/test-programs/src/bin/*?

I actually starting by creating the integration-style test, but the function is internal so I had to make it public. That felt a bit awkward so moved to the unit test within file.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 10 2026 at 20:35):

eduardomourar edited a comment on PR #14107:

Thanks! Unit tests where they are right now are often pretty brittle, so would you be up for adding more integration-style tests for this? For example extending tests/all/cli_tests.rs and adding guest programs to crates/test-programs/src/bin/*?

I actually started by creating the integration-style test, but the function is internal so I had to make it public. That felt a bit awkward so moved to the unit test within file, instead.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 10 2026 at 21:03):

eduardomourar requested dicej for a review on PR #14107.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 10 2026 at 21:03):

eduardomourar requested wasmtime-core-reviewers for a review on PR #14107.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 10 2026 at 21:03):

eduardomourar updated PR #14107.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 10 2026 at 21:04):

:memo: eduardomourar submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 10 2026 at 21:04):

:speech_balloon: eduardomourar created PR review comment:

done

view this post on Zulip Wasmtime GitHub notifications bot (Aug 10 2026 at 21:06):

eduardomourar edited a comment on PR #14107:

Thanks! Unit tests where they are right now are often pretty brittle, so would you be up for adding more integration-style tests for this? For example extending tests/all/cli_tests.rs and adding guest programs to crates/test-programs/src/bin/*?

I actually started by creating the integration-style test, but the function is internal so I had to make it public. That felt a bit awkward so moved to the unit test within file, instead. Forget completely what I said. Just created the integration tests without the need to make the function public.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 10 2026 at 21:14):

:thumbs_up: dicej submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 10 2026 at 21:14):

:speech_balloon: dicej created PR review comment:

Why is it necessary to mem::forget this? It looks like it should only be dropped when this function returns, which is after the child has exited.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 10 2026 at 22:24):

:memo: eduardomourar submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 10 2026 at 22:24):

:speech_balloon: eduardomourar created PR review comment:

Good catch. Replaced with into_raw_fd() which properly transfers fd ownership to Stdio without needing mem::forget. The previous as_raw_fd() + mem::forget was avoiding a double-close (both dir_file and Stdio would try to close the same fd), but into_raw_fd() is the right way to express this ownership transfer.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 10 2026 at 22:31):

:speech_balloon: eduardomourar edited PR review comment.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 10 2026 at 22:32):

eduardomourar updated PR #14107.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 10 2026 at 22:35):

dicej has enabled auto merge for PR #14107.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 10 2026 at 22:43):

dicej added PR #14107 fix(wasmtime-cli): generic eio error thrown for wasip2 to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 10 2026 at 23:08):

github-merge-queue[bot] removed PR #14107 fix(wasmtime-cli): generic eio error thrown for wasip2 from the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 10 2026 at 23:12):

dicej commented on PR #14107:

@eduardomourar Looks like the Windows build is broken, which indicates that we'll need a stub version of p2_cli_stdin_eisdir for #[cfg(not(unix))] to make the foreach_cli!(assert_test_exists); check happy.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 10 2026 at 23:22):

eduardomourar updated PR #14107.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2026 at 01:05):

github-actions[bot] added the label wasi on PR #14107.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2026 at 13:42):

dicej added PR #14107 fix(wasmtime-cli): generic eio error thrown for wasip2 to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2026 at 14:08):

:check: dicej merged PR #14107.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2026 at 14:08):

dicej removed PR #14107 fix(wasmtime-cli): generic eio error thrown for wasip2 from the merge queue.


Last updated: Aug 30 2026 at 09:07 UTC