...
1env GO111MODULE=off
2
3# go list -find should not report imports
4
5go list -f {{.Incomplete}} x/y/z... # should probably exit non-zero but never has
6stdout true
7go list -find -f '{{.Incomplete}} {{.Imports}}' x/y/z...
8stdout '^false \[\]'
9
10# go list -find -compiled should use cached sources the second time it's run.
11# It might not find the same cached sources as "go build", but the sources
12# should be identical. "go build" derives action IDs (which are used as cache
13# keys) from dependencies' action IDs. "go list -find" won't know what the
14# dependencies are, so it's can't construct the same action IDs.
15[short] skip
16go list -find -compiled net
17go list -find -compiled -x net
18! stderr 'cgo'
19
20-- x/y/z/z.go --
21package z
22import "does/not/exist"
View as plain text