aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/testdata/script/mod_list_std.txt
blob: 76a3b00d1c9779ae2282be6752c653c9028d2612 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
env GO111MODULE=on
env GOPROXY=off

[!gc] skip
[short] skip

# Outside of GOROOT, our vendored packages should be reported as part of the standard library.
go list -f '{{if .Standard}}{{.ImportPath}}{{end}}' std cmd
stdout ^vendor/golang.org/x/net/http2/hpack
stdout ^cmd/vendor/golang\.org/x/arch/x86/x86asm

# cmd/... should match the same packages it used to match in GOPATH mode.
go list cmd/...
stdout ^cmd/compile
! stdout ^cmd/vendor/golang\.org/x/arch/x86/x86asm

# GOROOT/src/... should list the packages in std as if it were a module
# dependency: omitting vendored dependencies and stopping at the 'cmd' module
# boundary.

go list $GOROOT/src/...
stdout ^bytes$
! stdout ^builtin$
! stdout ^cmd/
! stdout ^vendor/


# Within the std module, listing ./... should omit the 'std' prefix:
# the package paths should be the same via ./... or the 'std' meta-pattern.
# TODO(golang.org/issue/30241): Make that work.
# Today, they are listed in 'std' but not './...'.
cd $GOROOT/src
go list ./...
! stdout ^vendor/golang.org/x  # TODO: should be included, or should be omitted from 'std'.

cp stdout $WORK/listdot.txt
go list std
stdout ^vendor/golang.org/x  # TODO: remove vendor/ prefix
# TODO: cmp stdout $WORK/listdot.txt

go list all
stdout ^vendor/golang.org/x  # TODO: remove vendor/ prefix.
! stdout ^std/


# Within the std module, the vendored dependencies of std should appear
# to come from the actual modules.
# TODO(golang.org/issue/30241): Make that work.
# Today, they still have the vendor/ prefix.
go list std
stdout ^vendor/golang.org/x/net/http2/hpack  # TODO
! stdout ^golang.org/x/net/http2/hpack       # TODO

go list -deps -f '{{if not .Standard}}{{.ImportPath}}{{end}}' std
# ! stdout ^vendor/golang.org/x/net/http2/hpack  # TODO
! stdout ^golang.org/x/net/http2/hpack         # TODO


# Within std, the vendored dependencies of cmd should still appear to be part of cmd.
go list -f '{{if .Standard}}{{.ImportPath}}{{end}}' cmd
stdout ^cmd/vendor/golang\.org/x/arch/x86/x86asm

go list -f '{{if not .Standard}}{{.ImportPath}}{{end}}' cmd
! stdout .

go list cmd/...
stdout ^cmd/compile
! stdout ^cmd/vendor/golang\.org/x/arch/x86/x86asm