summaryrefslogtreecommitdiffstats
path: root/src/cmd/go/testdata/script/install_rebuild_gopath.txt
blob: 14a6c8611e32d5421276b71c2a2bb975e80eb8db (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
env GO111MODULE=off

# GOPATH with p1 in d1, p2 in d2
env GOPATH=$WORK/d1${:}$WORK/d2

# build & install p1
go install -i p1
! stale p1 p2

# modify p2 - p1 should appear stale
cp $WORK/p2x.go $WORK/d2/src/p2/p2.go
stale p1 p2

# build & install p1 again
go install -i p1
! stale p1 p2

-- $WORK/d1/src/p1/p1.go --
package p1
import "p2"
func F() { p2.F() }

-- $WORK/d2/src/p2/p2.go --
package p2
func F() {}

-- $WORK/p2x.go --
package p2
func F() {}
func G() {}