@@ -91,37 +91,37 @@ display:""`,
91
91
// package of this directory.
92
92
cfg : dirCfg ,
93
93
args : nil ,
94
- want : `path: mod.test/test
95
- module: mod.test/test
94
+ want : `err: import failed: cannot find package "mod.test/test/sub":
95
+ $CWD/testdata/testmod/test.cue:3:8
96
+ path: mod.test/test@v0
97
+ module: mod.test/test@v0
96
98
root: $CWD/testdata/testmod
97
99
dir: $CWD/testdata/testmod
98
100
display:.
99
101
files:
100
- $CWD/testdata/testmod/test.cue
101
- imports:
102
- mod.test/test/sub: $CWD/testdata/testmod/sub/sub.cue` }, {
102
+ $CWD/testdata/testmod/test.cue` }, {
103
103
name : "DefaultPackageWithExplicitDotArgument" ,
104
104
// Even though the directory is called testdata, the last path in
105
105
// the module is test. So "package test" is correctly the default
106
106
// package of this directory.
107
107
cfg : dirCfg ,
108
108
args : []string {"." },
109
- want : `path: mod.test/test
110
- module: mod.test/test
109
+ want : `err: import failed: cannot find package "mod.test/test/sub":
110
+ $CWD/testdata/testmod/test.cue:3:8
111
+ path: mod.test/test@v0
112
+ module: mod.test/test@v0
111
113
root: $CWD/testdata/testmod
112
114
dir: $CWD/testdata/testmod
113
115
display:.
114
116
files:
115
- $CWD/testdata/testmod/test.cue
116
- imports:
117
- mod.test/test/sub: $CWD/testdata/testmod/sub/sub.cue` }, {
117
+ $CWD/testdata/testmod/test.cue` }, {
118
118
name : "RelativeImportPathWildcard" ,
119
119
cfg : dirCfg ,
120
120
args : []string {"./other/..." },
121
121
want : `err: import failed: relative import paths not allowed ("./file"):
122
122
$CWD/testdata/testmod/other/main.cue:6:2
123
123
path: ""
124
- module: mod.test/test
124
+ module: mod.test/test@v0
125
125
root: $CWD/testdata/testmod
126
126
dir: ""
127
127
display:""` }, {
@@ -130,8 +130,8 @@ display:""`}, {
130
130
args : []string {"./anon" },
131
131
want : `err: build constraints exclude all CUE files in ./anon:
132
132
anon/anon.cue: no package name
133
- path: mod.test/test/anon
134
- module: mod.test/test
133
+ path: mod.test/test/anon@v0
134
+ module: mod.test/test@v0
135
135
root: $CWD/testdata/testmod
136
136
dir: $CWD/testdata/testmod/anon
137
137
display:./anon` }, {
@@ -140,8 +140,8 @@ display:./anon`}, {
140
140
args : []string {"./other" },
141
141
want : `err: import failed: relative import paths not allowed ("./file"):
142
142
$CWD/testdata/testmod/other/main.cue:6:2
143
- path: mod.test/test/other
144
- module: mod.test/test
143
+ path: mod.test/test/other@v0:main
144
+ module: mod.test/test@v0
145
145
root: $CWD/testdata/testmod
146
146
dir: $CWD/testdata/testmod/other
147
147
display:./other
@@ -150,41 +150,36 @@ files:
150
150
name : "RelativePathSuccess" ,
151
151
cfg : dirCfg ,
152
152
args : []string {"./hello" },
153
- want : `path: mod.test/test/hello
154
- module: mod.test/test
153
+ want : `err: import failed: cannot find package "mod.test/test/sub":
154
+ $CWD/testdata/testmod/test.cue:3:8
155
+ path: mod.test/test/hello@v0:test
156
+ module: mod.test/test@v0
155
157
root: $CWD/testdata/testmod
156
158
dir: $CWD/testdata/testmod/hello
157
159
display:./hello
158
160
files:
159
161
$CWD/testdata/testmod/test.cue
160
- $CWD/testdata/testmod/hello/test.cue
161
- imports:
162
- mod.test/test/sub: $CWD/testdata/testmod/sub/sub.cue` }, {
162
+ $CWD/testdata/testmod/hello/test.cue` }, {
163
163
name : "ExplicitPackageIdentifier" ,
164
164
cfg : dirCfg ,
165
165
args : []string {"mod.test/test/hello:test" },
166
- want : `path: mod.test/test/hello:test
167
- module: mod.test/test
166
+ want : `err: cannot find package "mod.test/test/hello:test"
167
+ path: mod.test/test/hello:test
168
+ module: mod.test/test@v0
168
169
root: $CWD/testdata/testmod
169
- dir: $CWD/testdata/testmod/hello
170
- display:mod.test/test/hello:test
171
- files:
172
- $CWD/testdata/testmod/test.cue
173
- $CWD/testdata/testmod/hello/test.cue
174
- imports:
175
- mod.test/test/sub: $CWD/testdata/testmod/sub/sub.cue` }, {
170
+ dir: $CWD/testdata/testmod/cue.mod/gen/mod.test/test/hello
171
+ display:mod.test/test/hello:test` ,
172
+ }, {
176
173
name : "NoPackageName" ,
177
174
cfg : dirCfg ,
178
175
args : []string {"mod.test/test/hello:nonexist" },
179
- want : `err: build constraints exclude all CUE files in mod.test/test/hello:nonexist:
180
- anon.cue: no package name
181
- test.cue: package is test, want nonexist
182
- hello/test.cue: package is test, want nonexist
176
+ want : `err: cannot find package "mod.test/test/hello:nonexist"
183
177
path: mod.test/test/hello:nonexist
184
- module: mod.test/test
178
+ module: mod.test/test@v0
185
179
root: $CWD/testdata/testmod
186
- dir: $CWD/testdata/testmod/hello
187
- display:mod.test/test/hello:nonexist` }, {
180
+ dir: $CWD/testdata/testmod/cue.mod/gen/mod.test/test/hello
181
+ display:mod.test/test/hello:nonexist` ,
182
+ }, {
188
183
name : "ExplicitNonPackageFiles" ,
189
184
cfg : dirCfg ,
190
185
args : []string {"./anon.cue" , "./other/anon.cue" },
@@ -222,7 +217,7 @@ files:
222
217
args : []string {"foo.com/bad-identifier" },
223
218
want : `err: implied package identifier "bad-identifier" from import path "foo.com/bad-identifier" is not valid
224
219
path: foo.com/bad-identifier
225
- module: mod.test/test
220
+ module: mod.test/test@v0
226
221
root: $CWD/testdata/testmod
227
222
dir: $CWD/testdata/testmod/cue.mod/gen/foo.com/bad-identifier
228
223
display:foo.com/bad-identifier` ,
@@ -232,7 +227,7 @@ display:foo.com/bad-identifier`,
232
227
args : []string {"nonexisting" },
233
228
want : `err: standard library import path "nonexisting" cannot be imported as a CUE package
234
229
path: nonexisting
235
- module: mod.test/test
230
+ module: mod.test/test@v0
236
231
root: $CWD/testdata/testmod
237
232
dir: ""
238
233
display:nonexisting` ,
@@ -242,7 +237,7 @@ display:nonexisting`,
242
237
args : []string {"strconv" },
243
238
want : `err: standard library import path "strconv" cannot be imported as a CUE package
244
239
path: strconv
245
- module: mod.test/test
240
+ module: mod.test/test@v0
246
241
root: $CWD/testdata/testmod
247
242
dir: ""
248
243
display:strconv` ,
@@ -251,17 +246,17 @@ display:strconv`,
251
246
cfg : dirCfg ,
252
247
args : []string {"./empty" },
253
248
want : `err: no CUE files in ./empty
254
- path: mod.test/test/empty
255
- module: mod.test/test
249
+ path: mod.test/test/empty@v0
250
+ module: mod.test/test@v0
256
251
root: $CWD/testdata/testmod
257
252
dir: $CWD/testdata/testmod/empty
258
253
display:./empty` ,
259
254
}, {
260
255
name : "PackageWithImports" ,
261
256
cfg : dirCfg ,
262
257
args : []string {"./imports" },
263
- want : `path: mod.test/test/imports
264
- module: mod.test/test
258
+ want : `path: mod.test/test/imports@v0
259
+ module: mod.test/test@v0
265
260
root: $CWD/testdata/testmod
266
261
dir: $CWD/testdata/testmod/imports
267
262
display:./imports
@@ -273,8 +268,8 @@ imports:
273
268
name : "OnlyToolFiles" ,
274
269
cfg : dirCfg ,
275
270
args : []string {"./toolonly" },
276
- want : `path: mod.test/test/toolonly
277
- module: mod.test/test
271
+ want : `path: mod.test/test/toolonly@v0:foo
272
+ module: mod.test/test@v0
278
273
root: $CWD/testdata/testmod
279
274
dir: $CWD/testdata/testmod/toolonly
280
275
display:./toolonly
@@ -289,8 +284,8 @@ files:
289
284
anon.cue: no package name
290
285
test.cue: package is test, want foo
291
286
toolonly/foo_tool.cue: _tool.cue files excluded in non-cmd mode
292
- path: mod.test/test/toolonly
293
- module: mod.test/test
287
+ path: mod.test/test/toolonly@v0:foo
288
+ module: mod.test/test@v0
294
289
root: $CWD/testdata/testmod
295
290
dir: $CWD/testdata/testmod/toolonly
296
291
display:./toolonly` }, {
@@ -300,8 +295,8 @@ display:./toolonly`}, {
300
295
Tags : []string {"prod" },
301
296
},
302
297
args : []string {"./tags" },
303
- want : `path: mod.test/test/tags
304
- module: mod.test/test
298
+ want : `path: mod.test/test/tags@v0
299
+ module: mod.test/test@v0
305
300
root: $CWD/testdata/testmod
306
301
dir: $CWD/testdata/testmod/tags
307
302
display:./tags
@@ -313,8 +308,8 @@ files:
313
308
Tags : []string {"prod" , "foo=bar" },
314
309
},
315
310
args : []string {"./tags" },
316
- want : `path: mod.test/test/tags
317
- module: mod.test/test
311
+ want : `path: mod.test/test/tags@v0
312
+ module: mod.test/test@v0
318
313
root: $CWD/testdata/testmod
319
314
dir: $CWD/testdata/testmod/tags
320
315
display:./tags
@@ -331,8 +326,8 @@ previous declaration here:
331
326
$CWD/testdata/testmod/tagsbad/prod.cue:1:1
332
327
multiple @if attributes:
333
328
$CWD/testdata/testmod/tagsbad/prod.cue:2:1
334
- path: mod.test/test/tagsbad
335
- module: mod.test/test
329
+ path: mod.test/test/tagsbad@v0
330
+ module: mod.test/test@v0
336
331
root: $CWD/testdata/testmod
337
332
dir: $CWD/testdata/testmod/tagsbad
338
333
display:./tagsbad` }, {
@@ -345,8 +340,8 @@ display:./tagsbad`}, {
345
340
$CWD/testdata/testmod/cycle/cycle.cue:3:8
346
341
$CWD/testdata/testmod/cue.mod/pkg/mod.test/cycle/bar/bar.cue:3:8
347
342
$CWD/testdata/testmod/cue.mod/pkg/mod.test/cycle/foo/foo.cue:3:8
348
- path: mod.test/test/cycle
349
- module: mod.test/test
343
+ path: mod.test/test/cycle@v0
344
+ module: mod.test/test@v0
350
345
root: $CWD/testdata/testmod
351
346
dir: $CWD/testdata/testmod/cycle
352
347
display:./cycle
0 commit comments