]> Cypherpunks repositories - gostls13.git/commit
cmd/go: use cached source files in "go list -find -compiled"
authorJay Conrod <jayconrod@google.com>
Fri, 21 Dec 2018 18:47:20 +0000 (13:47 -0500)
committerJay Conrod <jayconrod@google.com>
Fri, 21 Dec 2018 20:45:04 +0000 (20:45 +0000)
commitb7451e299ba2b1f69ecf8744adaf028ae437f262
tree8dec18f96045c4c3f16e20afd319ecd5ba8a23cc
parent00055152d320f60476ca5db1e7da4fc89f94834e
cmd/go: use cached source files in "go list -find -compiled"

When "go list" is invoked with -find, it clears the list of imports
for each package matched on the command line. This affects action IDs,
since they incorporate dependencies' action IDs. Consequently, the
build triggered by -compiled won't find sources cached by
"go build".

We can still safely cache compiled sources from multiple runs of
"go list -find -compiled" though, since cgo generated sources are not
affected by imported dependencies. This change adds a second look into
the cache in this situation.

Fixes #29371

Change-Id: Ia0ae5a403ab5d621feaa16f521e6a65ac0ae6d9a
Reviewed-on: https://go-review.googlesource.com/c/155481
Reviewed-by: Bryan C. Mills <bcmills@google.com>
src/cmd/go/internal/work/exec.go
src/cmd/go/testdata/script/list_find.txt