Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 02d46f7

Browse files
committedNov 8, 2022
docs: update import grammar
1 parent 392a48a commit 02d46f7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎docs/SPEC.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1460,7 +1460,7 @@ Module paths need not be unique across different registries.
14601460

14611461
#### Registry attribute
14621462

1463-
The `registry` attribute defines the available registries.
1463+
The `registry` attribute defines the available registries and must preceed a package clause.
14641464
The registry attribute expects two arguments, the first is the name of the registry and the second is the `$base` URL of the registry API endpoint.
14651465
See the [Registry API](#registry-api) for more details.
14661466

@@ -1482,7 +1482,9 @@ The import path may contain specifiers about which registry and which versions o
14821482
An import path follows this grammar:
14831483

14841484
ImportPath = ModulePath [ "/" PackagePath ] [ Version ] .
1485-
ModulePath = PathElement [ "/" PathElement ] [ MajorVersion ] .
1485+
ModulePath = RegistryName [ "/" ModuleName ] [ MajorVersion ] .
1486+
RegistryName = PathElement
1487+
ModuleName = PathElement
14861488
MajorVersion = "/v" int_lit .
14871489
PackagePath = PathElement { "/" PathElement } .
14881490
Version = PreVersion | MinVersion

0 commit comments

Comments
 (0)
Please sign in to comment.