@@ -119,21 +119,43 @@ the package in the current directory, provided there is a single
119
119
named package in this directory.
120
120
121
121
CUE packages are specified as an import path. An import path
122
- that is a rooted path --one that begins with a "." or ".."
123
- element-- is interpreted as a file system path and denotes the
122
+ that begins with a "." or ".." element is a relative import path,
123
+ is interpreted as a file system path, and denotes the
124
124
package instance in that directory.
125
125
126
- Otherwise, the import path P denotes an external package found
127
- in cue.mod/{pkg|gen|usr}/P.
126
+ Otherwise, the import path P is absolute and denotes a package that
127
+ may be external, usually found in an external registry. It may also
128
+ refer to a package in cue.mod/{pkg|gen|usr}/P - this is legacy
129
+ behavior that might be removed at a later date.
128
130
129
- An import path may contain one or more "..." to match any
130
- subdirectory: pkg/... matches all packages below pkg, including
131
- pkg itself, while foo/.../bar matches all directories named bar
132
- within foo. In all cases, directories containing cue.mod
133
- directories are excluded from the result.
131
+ An absolute import path is of the form P or P@vN where vN is the major
132
+ version of the module containing the package. An import path is mapped
133
+ to a registry location by consulting cue.mod/module.cue and the
134
+ registry configuration (see "cue help modules" and "cue help
135
+ registryconfig" for more details).
136
+
137
+ An import may contain a ":name" suffix to indicate a specific
138
+ package to load within a given path. It is necessary to specify this
139
+ when there is more than one package at the path.
140
+
141
+ For example, the following import path specifies a package
142
+ named "other" in some external module with major version v1.
143
+
144
+ foo.example/bar/baz@v1:other
145
+
146
+ A local import path may contain one or more "..." to match any
147
+ subdirectory: pkg/... matches all packages below pkg, including pkg
148
+ itself, while foo/.../bar matches all directories named bar within
149
+ foo. In all cases, directories containing cue.mod directories are
150
+ excluded from the result. "..." is not currently supported in external
151
+ import paths.
134
152
135
153
Directory and file names that begin with "." or "_" are ignored,
136
- unless explicitly listed as inputs.
154
+ unless explicitly listed as inputs. File with names ending "_tool.cue"
155
+ are ignored unless running "cue cmd" and they are in packages
156
+ explicitly mentioned on the command line. Files with names ending
157
+ "_test.cue" are ignored for the time being; they are reserved for
158
+ future testing functionality.
137
159
138
160
A package may also be specified as a list of .cue files.
139
161
The special symbol '-' denotes stdin or stdout and defaults to
0 commit comments