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

refactor: use include syntax for wasi:clocks #50

Merged
merged 3 commits into from
Dec 1, 2023
Merged

Conversation

Mossaka
Copy link
Collaborator

@Mossaka Mossaka commented Aug 28, 2023

This commit uses include syntax to simplify the proxy world by hiding the interfaces from wasi:clock package

@lukewagner
Copy link
Member

There's an interesting usability question here for how aggressively we want to use include to "factor out" imports between different proposals. For example, given the large number of interfaces in the WASI sockets proposal, include seems like a clear win. OTOH, if a proposal had one interface and one world, it would only add indirection (for the reader) to include the world instead of importing the interface. Cases like this PR are somewhere in the middle.

My impression is that, just looking at the before/after diff, the before state is more readable. However, I think that might just be superficially due to the name of the world: include wasi:clocks/example-world doesn't really tell me much. Just to pick a maybe-too-cute example, include wasi:clocks/support feels like it would be net more readable, so maybe we could pick that or some more helpful name than wasi:clocks/example-world?

@Mossaka
Copy link
Collaborator Author

Mossaka commented Aug 28, 2023

Yeah totally agree that example-world isn't helpful. Pat made a suggestion to rename all the example-world to imports and I have a PR for each one of them (e.g. wasi:clocks: WebAssembly/wasi-clocks#49). If we think support world would be a better name, I am more than happy to change it.

@pchickey
Copy link
Contributor

in a separate PR I suggested we rename example-world to imports. this is appropriate for poll, io, filesystem, sockets, clocks, and random. we should not export an imports world for http and cli.

@lukewagner
Copy link
Member

Cool, I like imports.

@Mossaka
Copy link
Collaborator Author

Mossaka commented Sep 19, 2023

I've updated the PR to use wasi:clocks/imports world.

@Mossaka
Copy link
Collaborator Author

Mossaka commented Oct 21, 2023

Rebased

Copy link
Member

@lukewagner lukewagner left a comment

Choose a reason for hiding this comment

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

lgtm

wit/proxy.wit Outdated Show resolved Hide resolved
This commit uses `include` syntax to simplify the proxy world
by hiding the interfaces from wasi:clock package

Signed-off-by: Jiaxiao Zhou (Mossaka) <duibao55328@gmail.com>
Signed-off-by: Jiaxiao Zhou (Mossaka) <duibao55328@gmail.com>
Signed-off-by: Jiaxiao Zhou (Mossaka) <duibao55328@gmail.com>
Copy link
Member

@lukewagner lukewagner left a comment

Choose a reason for hiding this comment

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

lgtm. It'd be good to have @pchickey sign off too.

@pchickey pchickey merged commit 7b74a93 into main Dec 1, 2023
1 check passed
@Mossaka Mossaka deleted the simplify-with-include branch December 1, 2023 01:37
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

Successfully merging this pull request may close these issues.

3 participants