You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
GO111MODULE=""
GOARCH="arm64"
GOBIN="~/gobin"
GOCACHE="~/Library/Caches/go-build"
GOENV="~/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="~/gopath/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="~/gopath"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_arm64"
GOVCS=""
GOVERSION="go1.20.4"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/dev/null"
GOWORK=""
CGO_CFLAGS="-O2 -g"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-O2 -g"
CGO_FFLAGS="-O2 -g"
CGO_LDFLAGS="-O2 -g"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/xs/zkk2d6w14450r_zrhkxycpnm0000gp/T/go-build1879129486=/tmp/go-build -gno-record-gcc-switches -fno-common"
GOROOT/bin/go version: go version go1.20.4 darwin/arm64
GOROOT/bin/go tool compile -V: compile version go1.20.4
uname -v: Darwin Kernel Version 22.4.0: Mon Mar 6 20:59:28 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T6000
ProductName: macOS
ProductVersion: 13.3.1
BuildVersion: 22E261
lldb --version: lldb-1403.0.17.64
Apple Swift version 5.8 (swiftlang-5.8.0.124.2 clang-1403.0.22.11.100)
What did you do?
go list -export -f {{.BuildID}} cmd/nm # _tyi3hDRTM966tQL-lDR/LVpI-0_na9f-uQ5ySyRo
go list -export -f {{.BuildID}} -cover cmd/nm # nx0pe6n6Sn3FVP9XHsWh/LVpI-0_na9f-uQ5ySyRo
go build -o nm cmd/nm
go tool buildid nm # actionID(binary)/_tyi3hDRTM966tQL-lDR/LVpI-0_na9f-uQ5ySyRo/contentID(binary)
go build -o nm-cover -cover cmd/nm
go tool buildid nm-cover # actionID(binary)/bZSqHNhfxHe4or9gncU5/0V_2bXo19x4hFJWTxIcL/contentID(binary)
What did you expect to see?
go tool buildid should show the same buildID as go list -export -f {{.BuildID}} when the -cover flag is present (ignoring binary action/content IDs).
What did you see instead?
go tool buildid shows a different action and content ID than go list -export -f {{.BuildID}} when the -cover flag is provided.
The basic issue is that go list does not seem to work for describing the output of a build with-cover (at least not the way it works without the -cover flag).
On further inspection, the cover tool doesn't seem to run for go list at all, so coverage instrumentation isn't happening, hence the lack of change in contentID.
The text was updated successfully, but these errors were encountered:
dmitshur
added
NeedsFix
The path to resolution is known, but the work has not been done.
and removed
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
labels
Jun 20, 2023
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
go tool buildid
should show the same buildID asgo list -export -f {{.BuildID}}
when the-cover
flag is present (ignoring binary action/content IDs).What did you see instead?
go tool buildid
shows a different action and content ID thango list -export -f {{.BuildID}}
when the-cover
flag is provided.The basic issue is that
go list
does not seem to work for describing the output of a build with-cover
(at least not the way it works without the-cover
flag).On further inspection, the
cover
tool doesn't seem to run forgo list
at all, so coverage instrumentation isn't happening, hence the lack of change in contentID.The text was updated successfully, but these errors were encountered: