cuelang.org/go@v0.10.1/internal/mod/modpkgload/testdata/localpackageambiguous.txtar (about) 1 # test0 shows that we can have a local import 2 # and it's OK even when there's a matching module 3 # in the registry. 4 5 # test1 shows that if there is a matching module already 6 # in the requirements that we get an "ambiguous import" 7 # error. 8 9 -- test0/initial-requirements -- 10 main.test@v0 11 -- test0/root-packages -- 12 main.test@v0:main 13 -- test0/default-major-versions -- 14 -- test0/want -- 15 main.test@v0:main 16 flags: inAll,isRoot,fromRoot,importsLoaded 17 mod: main.test@v0 18 location: . 19 imports: 20 example.com/blah 21 example.com/blah 22 flags: inAll,isRoot,fromRoot,importsLoaded 23 mod: local 24 location: cue.mod/gen/example.com/blah 25 -- test1/initial-requirements -- 26 main.test@v0 27 example.com@v0.0.1 28 -- test1/root-packages -- 29 main.test@v0:main 30 -- test1/default-major-versions -- 31 -- test1/want -- 32 main.test@v0:main 33 flags: inAll,isRoot,fromRoot,importsLoaded 34 mod: main.test@v0 35 location: . 36 imports: 37 example.com/blah 38 example.com/blah 39 flags: inAll,isRoot,fromRoot 40 error: ambiguous import: found package example.com/blah in multiple modules: 41 example.com@v0 v0.0.1 (_registry/example.com_v0.0.1/blah) 42 local (cue.mod/gen/example.com/blah) 43 missing: false 44 -- cue.mod/gen/example.com/blah/x.cue -- 45 package blah 46 -- main.cue -- 47 package main 48 import "example.com/blah" 49 50 -- _registry/example.com_v0.0.1/cue.mod/module.cue -- 51 module: "example.com@v0" 52 language: version: "v0.8.0" 53 -- _registry/example.com_v0.0.1/blah/blah.cue -- 54 package blah