WebAssembly / wasi-io

I/O Types proposal for WASI
Other
136 stars 19 forks source link

What is allowed to happen after `last-operation-failed` ? #83

Closed badeend closed 1 month ago

badeend commented 1 month ago

The docs for stream-error::closed read:

The stream is closed: no more input will be accepted by the stream.
A closed output-stream will return this error on all future operations.

Should the same apply for stream-error::last-operation-failed ? I.e.: are errors final or are transient errors allowed?

pchickey commented 1 month ago

The intent was that all errors are final - we couldn't come up with a good story for why transient errors should be reported at all through the stream interfaces.

I believe what I intended was for the last-operation-failed to be thrown the first time, and subsequently the stream is always closed.

badeend commented 1 month ago

Okay. I've created a PR to clarify this: https://github.com/WebAssembly/wasi-io/pull/84