Skip to content

Commit d1f4756

Browse files
authored
Use 'package name' more consistently in docs (#270)
1 parent 9a1ee9f commit d1f4756

File tree

2 files changed

+21
-18
lines changed

2 files changed

+21
-18
lines changed

design/mvp/Explainer.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1364,11 +1364,11 @@ interfacename ::= <namespace> <label> <projection> <version>?
13641364
namespace ::= <label> ':'
13651365
projection ::= '/' <label>
13661366
version ::= '@' <valid semver>
1367-
depname ::= 'unlocked-dep=<' <pkgidset> '>'
1368-
| 'locked-dep=<' <pkgid> '>' ( ',' <hashname> )?
1369-
pkgidset ::= <pkgname> <verrange>?
1370-
pkgid ::= <pkgname> <version>?
1371-
pkgname ::= <namespace> <label>
1367+
depname ::= 'unlocked-dep=<' <pkgnamequery> '>'
1368+
| 'locked-dep=<' <pkgname> '>' ( ',' <hashname> )?
1369+
pkgnamequery ::= <pkgpath> <verrange>?
1370+
pkgname ::= <pkgpath> <version>?
1371+
pkgpath ::= <namespace> <label>
13721372
| <namespace>+ <label> <projection>* 🪺
13731373
verrange ::= '@*'
13741374
| '@{' <verlower> '}'

design/mvp/WIT.md

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,22 @@ package suitable for distribution.
2727
[IDL]: https://en.wikipedia.org/wiki/Interface_description_language
2828
[components]: https://github.com/webassembly/component-model
2929

30-
## Package identifiers
30+
## Package Names
3131

32-
All WIT packages are assigned an "ID". IDs look like `foo:bar@1.0.0` and have
33-
three components:
32+
All WIT packages are assigned a *package name*. Package names look like
33+
`foo:bar@1.0.0` and have three fields:
3434

35-
* A namespace, for example `foo` in `foo:bar`. This namespace is intended to
36-
disambiguate between registries, top-level organizations, etc. For example
37-
WASI interfaces use the `wasi` namespace.
35+
* A *namespace field*, for example `foo` in `foo:bar`. This namespace is
36+
intended to disambiguate between registries, top-level organizations, etc.
37+
For example WASI interfaces use the `wasi` namespace.
3838

39-
* A package name, for example `clocks` in `wasi:clocks`. A package name groups
39+
* A *package field*, for example `clocks` in `wasi:clocks`. A "package" groups
4040
together a set of interfaces and worlds that would otherwise be named with a
4141
common prefix.
4242

43-
* An optional version, specified as [full semver](https://semver.org/).
43+
* An optional *version field*, specified as [full semver](https://semver.org/).
4444

45-
Package identifiers are specified at the top of a WIT file via a `package`
45+
Package names are specified at the top of a WIT file via a `package`
4646
declaration:
4747

4848
```wit
@@ -56,11 +56,14 @@ package wasi:clocks@1.2.0;
5656
```
5757

5858
WIT packages can be defined in a collection of files and at least one of them
59-
must specify a `package` identifier. Multiple files can specify a `package` and
60-
they must all agree on what the identifier is.
59+
must specify a package name. Multiple files can specify a `package` and
60+
they must all agree on what the package name is.
6161

62-
Package identifiers are used to generate IDs in the component model binary
63-
format for [`interface`s][interfaces] and [`world`s][worlds].
62+
Package names are used to generate the [names of imports and exports]
63+
in the Component Model's representation of [`interface`s][interfaces] and
64+
[`world`s][worlds] as described [below](#package-format).
65+
66+
[names of imports and exports]: Explainer.md#import-and-export-definitions
6467

6568
## WIT Interfaces
6669
[interfaces]: #wit-interfaces

0 commit comments

Comments
 (0)