Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected error codes #155

Closed
badeend opened this issue Aug 1, 2024 · 2 comments
Closed

Unexpected error codes #155

badeend opened this issue Aug 1, 2024 · 2 comments

Comments

@badeend
Copy link
Contributor

badeend commented Aug 1, 2024

The error-code enum contains a few cases that seem odd to me.

First and foremost:

/// Bad descriptor, similar to `EBADF` in POSIX.
bad-descriptor,

Assuming the WASI host is implemented correctly, the WASI guest should never be able to observe this, right?


Additionally, AFAIK, the following error codes are specific to sockets and do not apply to filesystem operations:

/// Connection already in progress, similar to `EALREADY` in POSIX.
already,
/// Operation in progress, similar to `EINPROGRESS` in POSIX.
in-progress,
/// Message too large, similar to `EMSGSIZE` in POSIX.
message-size,
@pchickey
Copy link
Contributor

pchickey commented Aug 5, 2024

Assuming the WASI host is implemented correctly, the WASI guest should never be able to observe this, right?

Correct - in a correct Component Model implementation, this is not possible to reach. This is a relic of Preview 1 and the prototype period of Preview 2 before resource types were implemented.

the following error codes are specific to sockets and do not apply to filesystem operations:

Correct, those never got pruned out either.

We should fix these in 0.3. I don't think we have yet figured out our source control strategy is for staging breaking changes that cant land in main during the 0.2 series. For lack of a better alternative, you could make a Draft (so it doesnt merge) PR that is called staging-0.3 or something that has these changes, and we can send more PRs to that branch as we come up with more breaking changes, and periodically merge main into it as well so they don't diverge too badly.

@badeend
Copy link
Contributor Author

badeend commented Aug 7, 2024

👍
Got a PR up at: #156

@badeend badeend closed this as completed Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants