Text file src/cmd/go/testdata/script/install_rebuild_gopath.txt

     1  env GO111MODULE=off
     2  
     3  # GOPATH with p1 in d1, p2 in d2
     4  env GOPATH=$WORK/d1${:}$WORK/d2
     5  
     6  # build & install p1
     7  go install -i p1
     8  ! stale p1 p2
     9  
    10  # modify p2 - p1 should appear stale
    11  cp $WORK/p2x.go $WORK/d2/src/p2/p2.go
    12  stale p1 p2
    13  
    14  # build & install p1 again
    15  go install -i p1
    16  ! stale p1 p2
    17  
    18  -- $WORK/d1/src/p1/p1.go --
    19  package p1
    20  import "p2"
    21  func F() { p2.F() }
    22  
    23  -- $WORK/d2/src/p2/p2.go --
    24  package p2
    25  func F() {}
    26  
    27  -- $WORK/p2x.go --
    28  package p2
    29  func F() {}
    30  func G() {}
    31  

View as plain text