...

Text file src/cuelang.org/go/internal/mod/modpkgload/testdata/packagegranularity.txtar

Documentation: cuelang.org/go/internal/mod/modpkgload/testdata

     1# This test checks that the package resolution is followed per-package
     2# rather than per-directory.
     3
     4-- test0/initial-requirements --
     5main.test@v0
     6-- test0/root-packages --
     7main.test@v0:main
     8-- test0/default-major-versions --
     9-- test0/want --
    10main.test@v0:main
    11	flags: inAll,isRoot,fromRoot,importsLoaded
    12	mod: main.test@v0
    13	location: .
    14	imports:
    15		example.com/blah@v0
    16example.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 --
    21main.test@v0
    22example.com@v0.0.1
    23foo.com/bar@v0.0.1
    24-- test1/root-packages --
    25main.test@v0:main
    26-- test1/default-major-versions --
    27-- test1/want --
    28main.test@v0:main
    29	flags: inAll,isRoot,fromRoot,importsLoaded
    30	mod: main.test@v0
    31	location: .
    32	imports:
    33		example.com/blah@v0
    34example.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
    40foo.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 --
    45package main
    46import "example.com/blah@v0"
    47
    48-- other/other.cue --
    49package other
    50import "example.com/blah:otherpkg"
    51
    52-- _registry/example.com_v0.0.1/cue.mod/module.cue --
    53module: "example.com@v0"
    54deps: {
    55	"foo.com/bar/hello@v0": v: "v0.2.3"
    56	"bar.com@v0": v: "v0.5.0"
    57}
    58-- _registry/example.com_v0.0.1/blah/blah.cue --
    59package blah
    60import _ "foo.com/bar/hello/goodbye@v0"
    61-- _registry/example.com_v0.0.1/blah/otherpkg.cue --
    62package otherpkg
    63import _ "foo.com/bar/hello/more@v0"
    64
    65-- _registry/foo.com_bar_v0.0.1/cue.mod/module.cue --
    66module: "foo.com/bar@v0"
    67-- _registry/foo.com_bar_v0.0.1/hello/goodbye/hello.cue --
    68package goodbye
    69-- _registry/foo.com_bar_v0.0.1/hello/more
    70package more

View as plain text