aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/testdata/script/list_std_stale.txt
blob: e5c1f334fd4004f81cbcb8de72ea3edad71fcd3a (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
# https://golang.org/issue/44725: packages in std should not be reported as stale,
# regardless of whether they are listed from within or outside GOROOT/src.

# Control case: net should not be stale at the start of the test,
# and should depend on vendor/golang.org/… instead of golang.org/….

! stale net

go list -deps net
stdout '^vendor/golang.org/x/net'
! stdout '^golang.org/x/net'

# Net should also not be stale when viewed from within GOROOT/src,
# and should still report the same package dependencies.

cd $GOROOT/src
! stale net

go list -deps net
stdout '^vendor/golang.org/x/net'
! stdout '^golang.org/x/net'


# However, 'go mod' and 'go get' subcommands should report the original module
# dependencies, not the vendored packages.

[!net] stop

env GOPROXY=
go mod why -m golang.org/x/net
stdout '^# golang.org/x/net\nnet\ngolang.org/x/net'