cuelang.org/go@v0.10.1/internal/mod/modpkgload/testdata/packagegranularity.txtar (about) 1 # This test checks that the package resolution is followed per-package 2 # rather than per-directory. 3 4 -- test0/initial-requirements -- 5 main.test@v0 6 -- test0/root-packages -- 7 main.test@v0:main 8 -- test0/default-major-versions -- 9 -- test0/want -- 10 main.test@v0:main 11 flags: inAll,isRoot,fromRoot,importsLoaded 12 mod: main.test@v0 13 location: . 14 imports: 15 example.com/blah@v0 16 example.com/blah@v0 17 flags: inAll,isRoot,fromRoot 18 error: cannot find module providing package example.com/blah@v0 19 missing: true 20 -- test1/initial-requirements -- 21 main.test@v0 22 example.com@v0.0.1 23 foo.com/bar@v0.0.1 24 -- test1/root-packages -- 25 main.test@v0:main 26 -- test1/default-major-versions -- 27 -- test1/want -- 28 main.test@v0:main 29 flags: inAll,isRoot,fromRoot,importsLoaded 30 mod: main.test@v0 31 location: . 32 imports: 33 example.com/blah@v0 34 example.com/blah@v0 35 flags: inAll,isRoot,fromRoot,importsLoaded 36 mod: example.com@v0.0.1 37 location: _registry/example.com_v0.0.1/blah 38 imports: 39 foo.com/bar/hello/goodbye@v0 40 foo.com/bar/hello/goodbye@v0 41 flags: inAll,isRoot,fromRoot,importsLoaded 42 mod: foo.com/bar@v0.0.1 43 location: _registry/foo.com_bar_v0.0.1/hello/goodbye 44 -- main.cue -- 45 package main 46 import "example.com/blah@v0" 47 48 -- other/other.cue -- 49 package other 50 import "example.com/blah:otherpkg" 51 52 -- _registry/example.com_v0.0.1/cue.mod/module.cue -- 53 module: "example.com@v0" 54 language: version: "v0.8.0" 55 deps: { 56 "foo.com/bar/hello@v0": v: "v0.2.3" 57 "bar.com@v0": v: "v0.5.0" 58 } 59 -- _registry/example.com_v0.0.1/blah/blah.cue -- 60 package blah 61 import _ "foo.com/bar/hello/goodbye@v0" 62 -- _registry/example.com_v0.0.1/blah/otherpkg.cue -- 63 package otherpkg 64 import _ "foo.com/bar/hello/more@v0" 65 66 -- _registry/foo.com_bar_v0.0.1/cue.mod/module.cue -- 67 module: "foo.com/bar@v0" 68 language: version: "v0.8.0" 69 -- _registry/foo.com_bar_v0.0.1/hello/goodbye/hello.cue -- 70 package goodbye 71 -- _registry/foo.com_bar_v0.0.1/hello/more 72 package more