Skip to content

Wasi: preview2 poll-oneoff returns list<bool>#6498

Merged
pchickey merged 5 commits intomainfrom
pch/poll_oneoff_return_list_bool
Jun 27, 2023
Merged

Wasi: preview2 poll-oneoff returns list<bool>#6498
pchickey merged 5 commits intomainfrom
pch/poll_oneoff_return_list_bool

Conversation

@pchickey
Copy link
Contributor

@pchickey pchickey commented Jun 1, 2023

In the early days of the preview2 prototype, there was some trouble with wit-bindgen that made it impossible to return a list<bool> from the poll-oneoff function.

This bug has since been resolved. The poll-oneoff definition in wit has been modified to return list<bool> and minor tweaks have been made at use sites to use the boolean.

@pchickey pchickey requested a review from a team as a code owner June 1, 2023 20:25
@pchickey pchickey requested review from fitzgen and sunfishcode and removed request for a team and fitzgen June 1, 2023 20:25
@pchickey
Copy link
Contributor Author

pchickey commented Jun 1, 2023

This will conflict with #6486. We can upstream the wit fix to the standards repo, rebase on main after 6486 lands, and then merge this, since this is a very minor change.

@github-actions github-actions bot added the wasi Issues pertaining to WASI label Jun 1, 2023
pchickey pushed a commit to WebAssembly/wasi-poll that referenced this pull request Jun 10, 2023
In the early days of the preview2 prototype, there was some trouble with
wit-bindgen that made it impossible to return a list<bool> from the
poll-oneoff function. This bug has since been resolved: bytecodealliance/wasmtime#6498
pchickey pushed a commit to WebAssembly/wasi-poll that referenced this pull request Jun 10, 2023
In the early days of the preview2 prototype, there was some trouble with
wit-bindgen that made it impossible to return a list<bool> from the
poll-oneoff function. This bug has since been resolved: bytecodealliance/wasmtime#6498
sunfishcode pushed a commit to WebAssembly/wasi-poll that referenced this pull request Jun 11, 2023
In the early days of the preview2 prototype, there was some trouble with
wit-bindgen that made it impossible to return a list<bool> from the
poll-oneoff function. This bug has since been resolved: bytecodealliance/wasmtime#6498
@alexcrichton
Copy link
Member

I don't believe this was supposed to be closed by that PR, so reopening

@alexcrichton alexcrichton reopened this Jun 12, 2023
// The generated definition of command will pull in std, so we are defining it
// manually below instead
skip: ["run", "get-directories", "get-environment"],
skip: ["run", "get-environment", "poll-oneoff"],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a comment about why poll-oneoff is skip here, and has manual bindings below instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pchickey pchickey force-pushed the pch/poll_oneoff_return_list_bool branch from 258aade to d76f4f4 Compare June 27, 2023 17:26
@pchickey pchickey added this pull request to the merge queue Jun 27, 2023
Merged via the queue into main with commit a330867 Jun 27, 2023
@pchickey pchickey deleted the pch/poll_oneoff_return_list_bool branch June 27, 2023 22:10
saulecabrera pushed a commit to saulecabrera/wasmtime that referenced this pull request Jun 28, 2023
* poll.wit: we can returl a list<bool> now

* adapter: fixes for poll-oneoff returning list<bool>

* wasi preview2: fixes for poll-oneoff returning list<bool>

* adapter: manually import poll-oneoff to avoid pulling in std to allocate return vec

* comment describing the skip functions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wasi Issues pertaining to WASI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants