-
Notifications
You must be signed in to change notification settings - Fork 83
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
WIT Syntax: interface
#115
Comments
This change makes a lot of sense to me, thanks for writing it up! Two follow-up comments: In the BA tooling impl meeting last week, we discussed whether it was worth making the breaking change to always require interfaces to be wrapped with Another thing to consider is how URLs come in. Analogous to the now-merged #109, it seems like URL would be an optional second string after the |
Thanks for capturing this @lukewagner! Completely agree. I updated the above grammar to reflect that. |
WIT +
interface
Given the proposal to introduce a new top-level WIT syntax (i.e.
worlds
) for describing component types, it has become clear that*.wit
documents are evolving to be able to express more than just a singular interface per file.Additionally, while conceptually defining an interface per file may be desired (or even idiomatic) for many repositories it is inconvenient for use-cases where inlining N interfaces into a single
*.wit
file is preferable; For example tests become unwieldy and verbose if strewn across many files.The
interface
syntax introduced below will enable such use-cases effectively loosening the currently imposed conventional organization of*.wit
files.See motivating comments.
From a component-model POV, an
interface
isWIT
syntax for describing an instance type. As an example consider how the following interfaces might be modeled withWIT
today:Enabling the
interface
keyword will allow the refactor of these*.wit
documents into a single file, e.g.:Concretely, the structure of an
interface
is:The text was updated successfully, but these errors were encountered: