Description
What version of Go are you using (go version
)?
$ go version
go version go1.10rc2 darwin/amd64
Does this issue reproduce with the latest release?
Haven't checked yet.
What operating system and processor architecture are you using (go env
)?
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/Dmitri/Library/Caches/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/tmp/emptygopath"
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/tw/kgz4v2kn4n7d7ryg5k_z3dk40000gn/T/go-build834347091=/tmp/go-build -gno-record-gcc-switches -fno-common"
What did you do?
~ $ export GOPATH=/tmp/emptygopath
~ $ go get -u -v github.com/kisielk/gotool
github.com/kisielk/gotool (download)
created GOPATH=/tmp/emptygopath; see 'go help gopath'
github.com/kisielk/gotool/internal/load
github.com/kisielk/gotool
~ $ go list -f '{{.Stale}} {{.StaleReason}}' github.com/kisielk/gotool
true stale dependency: github.com/kisielk/gotool/internal/load
~ $ go install -v github.com/kisielk/gotool
~ $ go list -f '{{.Stale}} {{.StaleReason}}' github.com/kisielk/gotool
true stale dependency: github.com/kisielk/gotool/internal/load
~ $ go install -v github.com/kisielk/gotool/internal/load
~ $ go list -f '{{.Stale}} {{.StaleReason}}' github.com/kisielk/gotool
false
Note that at the time of this issue report, github.com/kisielk/gotool
is at revision https://github.com/kisielk/gotool/tree/d6ce6262d87e3a4e153e86023ff56ae771554a41.
What did you expect to see?
~ $ export GOPATH=/tmp/emptygopath
~ $ go get -u -v github.com/kisielk/gotool
github.com/kisielk/gotool (download)
created GOPATH=/tmp/emptygopath; see 'go help gopath'
github.com/kisielk/gotool/internal/load
github.com/kisielk/gotool
~ $ go list -f '{{.Stale}} {{.StaleReason}}' github.com/kisielk/gotool
false
~ $ go install -v github.com/kisielk/gotool
~ $ go list -f '{{.Stale}} {{.StaleReason}}' github.com/kisielk/gotool
false
~ $ go install -v github.com/kisielk/gotool/internal/load
~ $ go list -f '{{.Stale}} {{.StaleReason}}' github.com/kisielk/gotool
false
What did you see instead?
As shown in "What did you do?" section, the package github.com/kisielk/gotool
was being reported as "stale" with the reason that there was a stale dependency github.com/kisielk/gotool/internal/load
. Doing go install
did not make the package fresh, even though it should've.
To me, this looks like the same issue as #23797, and it's related to the new build cache of Go 1.10 (/cc @mvdan @bradfitz @rsc). However, I figured I'd report it anyway for an extra test case, since it was so easily reproducible. There's a small chance it's not exactly the same issue, but easy to verify after #23797 is resolved.