Skip to content

wit: Propagate feature gate annotations to inner items #559

@lann

Description

@lann

I think that these two snippets should be equivalent:

@since(version = 0.1.0)
interface handler {
  handle: func();

  @since(version = 0.2.0);
  new-handle: func();
}
@since(version = 0.1.0)
interface new-interface {
  @since(version = 0.1.0)
  hello: func();

  @since(version = 0.2.0);
  new-handle: func();
}

The more explicit version would be the canonical form reflected in the parse tree.

I think this goes beyond just authoring convenience. When every item is annotated it becomes more difficult to pick out the exceptional items; see e.g. https://github.com/WebAssembly/wasi-http/blob/main/wit/types.wit

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions