-
Notifications
You must be signed in to change notification settings - Fork 99
Description
Currently, WIT package names put the version after the package name:
package wasi:http@2.0.0;However, WIT use statements and similar things put the version after the interface:
use wasi:http/types@0.2.0.{incoming-request};Similarly, import/export strings also put the version after the interface:
(import "wasi:http/types@0.2.0" (instance (;0;) (type 0)))These lead me to sometimes be confused about whether to say wasi:http@0.2.0/types.{incoming-request} or wasi:http/types@0.2.0.{incoming-request}. I've been trying to get used to it by telling myself that package wasi:http@2.0.0; is syntax-sugar for adding the version explicitly to all of the contained interfaces, but I still get confused. It doesn't help that interface types@0.2.0 { isn't valid in WIT, and I don't expect it ever will be.
And, wasi:http/types@0.2.0.{incoming-request} suggests a misleading mental model, as if wasi:http were a thing that gets looked up without a version, and then types@0.2.0 is a versioned thing to look up inside that.
Additionally, types@0.2.0.{incoming-request} is awkward with a . immediately after the .-separated semver syntax, looking to a first glance like it might be part of the version.
I propose changing WIT and components to use the wasi:http@0.2.0/types.{incoming-request} form, pre-1.0 when we have an opportunity to make a breaking change.