component-model icon indicating copy to clipboard operation
component-model copied to clipboard

Enable WIT gates to take user-defined strings as arguments

Open yoshuawuyts opened this issue 1 year ago • 0 comments

Following #377, we'd like to be able to write @deprecated with a message parameter containing a user-defined string, like this:

package local:demo;

interface host {
  @deprecated(version = "1.1.0", message = "please use function `bar` instead")
  @since(version = "1.0.0")
  foo: func(msg: string);
  
  @since(version = "1.1.0")
  bar: func(msg: string);
}

That's currently not possible because we don't yet have a string syntax for WIT (did I get that right?). Given that @message was optional we decided to punt on that instead. I'm filing this issue to make sure we keep track that this is a feature we'd like to add, but are currently blocked on figuring out how we want to handle strings.

yoshuawuyts avatar Aug 16 '24 15:08 yoshuawuyts