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

Describe "explicit"-style WIT package grammar #340

Merged

Conversation

azaslavsky
Copy link
Contributor

@azaslavsky azaslavsky commented Apr 12, 2024

This enables the inclusion of multiple package definitions in a single .wit file, as discussed in
#313.

This enables the inclusion of multiple package definitions in a sngle
`.wit` file, as discussed in
WebAssembly#313.
@alexcrichton
Copy link
Collaborator

An interesting consequence of being able to intermix files that have package foo:bar; and files that have package foo:baz { ... } is that we may no longer need the deps directory in wit-parser. You could, for example, have wasi-*.wit in the wit folder directly perhaps. Not that this is necessarily a good idea, but it's an idea this would open up.

@ydnar
Copy link

ydnar commented Apr 17, 2024

This is great—it would allow round-trip serialization of a Resolve back into WIT in a single consumable file.

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.

Looks great, thanks for working on this!

@lukewagner
Copy link
Member

Does this look good to merge, or would we like to wait for any additional implementation feedback?

@azaslavsky
Copy link
Contributor Author

azaslavsky commented May 10, 2024 via email

@lukewagner
Copy link
Member

Mostly the latter. For WIT changes, I've generally been trying to keep WIT.md reflective of what is actually in the WIT toolchains (or, if not, gating the feature via a unicode emoji), so I was mostly curious if the implementation of this feature has been implemented and merged.

@alexcrichton
Copy link
Collaborator

This hasn't yet been merged into wasm-tools (or others as far as I know). That being said I think it's reasonable to merge here 👍

@lukewagner
Copy link
Member

Ah thanks. Do you think it might be merged soonish, or would it make sense to emoji-gate this feature?

@alexcrichton
Copy link
Collaborator

I've not been working on it myself, but @azaslavsky I recall you were working on an initial implementation I think?

@azaslavsky
Copy link
Contributor Author

@alexcrichton I am. Its fallen a bit on my priority list due to $dayjob concerns, but I should have the revised PR up by end of week.

@azaslavsky
Copy link
Contributor Author

bytecodealliance/wasm-tools#1577 implementing this has merged, so I think this can land as well?

@lukewagner lukewagner merged commit 736660c into WebAssembly:main Jun 6, 2024
1 check passed
@lukewagner
Copy link
Member

Awesome, thanks again!

ydnar added a commit to bytecodealliance/go-modules that referenced this pull request Jun 9, 2024
Do not write with additional braces for single-file, multi-package format.

WebAssembly/component-model#340
bytecodealliance/wasm-tools#1577
ydnar added a commit to bytecodealliance/go-modules that referenced this pull request Jun 9, 2024
Do not write with additional braces for single-file, multi-package format.

WebAssembly/component-model#340
bytecodealliance/wasm-tools#1577
ydnar added a commit to bytecodealliance/go-modules that referenced this pull request Jun 11, 2024
Do not write with additional braces for single-file, multi-package format.

WebAssembly/component-model#340
bytecodealliance/wasm-tools#1577
ydnar added a commit to bytecodealliance/go-modules that referenced this pull request Jun 11, 2024
Do not write with additional braces for single-file, multi-package format.

WebAssembly/component-model#340
bytecodealliance/wasm-tools#1577
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.

4 participants