Conversation
alexcrichton
left a comment
There was a problem hiding this comment.
Could you expand a bit about the semantic meaning of the include statement? For example when with is required, what with does, when include might fail, etc.
Good suggestion. I have thought about that but then I saw the section I've modified is for Lexical Structure. Is there a dedicated section for semantic structure of WIT? If not, I can expand the the semantic meaning in the part where I modified. @alexcrichton |
|
The top of the document is probably the best place for that right now, probably around the area that |
alexcrichton
left a comment
There was a problem hiding this comment.
Looking good, but I might recommend trying to run some examples through wit-parser to sort out self/pkg paths since right now they're relatively imprecise and can lead to some ambiguities in the examples I think. I realize that include isn't implemented yet but I think most other pieces should be able to be fleshed out to make sure they're valid.
As I think about this as well though the "de-duplication" section I think will actually need to be required for the first implementation. It's not valid to import the same interface twice under two names, so if the same interface is imported into two worlds which are union'd then it's required that a deduplication happens rather than emitting two separate imports (e.g. resolving with with isn't valid)
That's a really good point. Transient deps are always hard haha. I will update the doc to include de-dep semantics. |
|
~one way to make this less verbose than: ... could be to change the Of course, this would mostly just be syntactical sugar – the union of worlds should still equate to a world. |
|
@alexcrichton thanks for reviewing. Could you please take another look? |
alexcrichton
left a comment
There was a problem hiding this comment.
Looks good to me, thanks!
Signed-off-by: Jiaxiao Zhou <jiazho@microsoft.com>
Signed-off-by: Jiaxiao Zhou <jiazho@microsoft.com>
Signed-off-by: Jiaxiao Zhou <jiazho@microsoft.com>
Signed-off-by: jiaxiao zhou <jiazho@microsoft.com>
Signed-off-by: jiaxiao zhou <jiazho@microsoft.com>
|
I will rebase once #198 is merged in. |
This commit updates the WIT syntax in all of the examples illustrating the use of the include syntax. Signed-off-by: Jiaxiao Zhou (Mossaka) <duibao55328@gmail.com>
|
Okay, I think this PR is ready to review @guybedford |
guybedford
left a comment
There was a problem hiding this comment.
It would be great to see this moving forward, thanks for the update.
Co-authored-by: Guy Bedford <guybedford@gmail.com>
Signed-off-by: Jiaxiao Zhou (Mossaka) <duibao55328@gmail.com>
Co-authored-by: Luke Wagner <mail@lukewagner.name>
Co-authored-by: Luke Wagner <mail@lukewagner.name>
Signed-off-by: Jiaxiao Zhou (Mossaka) <duibao55328@gmail.com>
There was a problem hiding this comment.
Thanks for the updates, and great work. Regarding the most recent change, which says that you can't rename an ID, unfortunately we can't just rule it out syntactically, because include x with { a as b } may or may not be allowed depending on x. Here's a suggested rewording, but feel free to reject and do it your own way.
Co-authored-by: Luke Wagner <mail@lukewagner.name>
Co-authored-by: Luke Wagner <mail@lukewagner.name>
|
Thank you, @lukewagner !! I have committed your suggestions. |
lukewagner
left a comment
There was a problem hiding this comment.
Thanks Joe, overall lgtm, thanks for spearheading this! I'm thinking I'll merge early next week if there aren't any more comments from anyone.
|
Thanks everyone for reviewing this!! This meant a lot to me as it marks the first contribution I've contributed to a Wasm proposal. Cheers 🙌 🥂 |
As proposed by #169 , this PR adds an
includekeyword to the WIT.md. It also sorts the keyword list alphabetically.