Skip to content

Commit 7701389

Browse files
refactor: add feature prefix and link
Signed-off-by: Victor Adossi <[email protected]>
1 parent 8aef89c commit 7701389

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

design/mvp/WIT.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,14 +1042,17 @@ interface calc {
10421042
**First, add new items under an `@unstable` annotation with a `feature` specified:**
10431043

10441044
```wit
1045-
package examples:[email protected];
1045+
package examples:fgates-calc@0.1.1;
10461046
10471047
// ... elided ...
10481048
10491049
interface calc {
10501050
add: func(x: i32, y: i32) -> result<i32, calc-error>;
10511051
1052-
@unstable(feature = minus)
1052+
/// By convention, feature flags should be prefixed with package name to reduce chance of collisions
1053+
///
1054+
/// see: https://github.com/WebAssembly/WASI/blob/main/Contributing.md#filing-changes-to-existing-phase-3-proposals
1055+
@unstable(feature = fgates-calc-minus)
10531056
sub: func(x: i32, y: i32) -> result<i32, calc-error>;
10541057
}
10551058
```
@@ -1061,7 +1064,7 @@ Note that if we had to *add* a new variant to `calc-error`, this would be a *bre
10611064
**Second, when the feature is ready to be stabilized, switch to a `@since` annotation:**
10621065

10631066
```wit
1064-
package examples:fgates-stabilization@0.1.2;
1067+
package examples:fgates-calc@0.1.2;
10651068
10661069
// ... elided ...
10671070
@@ -1073,7 +1076,7 @@ interface calc {
10731076
}
10741077
```
10751078

1076-
While you *may* include the `feature` portion of `@since` (i.e. `@since(version = 0.1.2, feature = minus)`), it is *ignored* by tooling and is only informational once the feature is stabilized.
1079+
While you *may* include the `feature` portion of `@since` (i.e. `@since(version = 0.1.2, feature = fgates-calc-minus)`), it is *ignored* by tooling and is only informational once the feature is stabilized.
10771080

10781081
#### Scenario: Deprecation of an existing stable feature
10791082

0 commit comments

Comments
 (0)