-
Notifications
You must be signed in to change notification settings - Fork 17.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/go/internal/list: may fail if -export -covermode=atomic
is used
#68212
Comments
I'm observing this issue with all go releases tested so far ( Investigations so far (superficially) suggest that:
This is the same as #65264, which has been closed/resolved on Feb 1st, so I was expecting the fix to be released already? |
Oh my bad, it's fixed in I'm okay with this being closed; however I'd like to understand if there is any plan to back-port this fix to 1.21 and/or 1.22... |
The fix in ac08c05 looks simple enough to backport to me. |
Change https://go.dev/cl/595496 mentions this issue: |
Change https://go.dev/cl/595495 mentions this issue: |
…ons for 'go list -cover' When -covermode is set to atomic, instrumented packages need to import sync/atomic. If this is not already imported by a package being instrumented, the build needs to ensure that sync/atomic is compiled whenever 'go list' is run in a way that triggers package builds. The build config was already being made to ensure the import, but only after the action graph had been created, so there was no guarantee that sync/atomic would be built when needed. For #65264 For #68212 Fixes #68221 Change-Id: Ib3f1e102ce2ef554ea08330d9db69a8c98790ac5 Reviewed-on: https://go-review.googlesource.com/c/go/+/560236 Run-TryBot: Bryan Mills <bcmills@google.com> Auto-Submit: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Bryan Mills <bcmills@google.com> Reviewed-by: Michael Matloob <matloob@golang.org> (cherry picked from commit ac08c05) Reviewed-on: https://go-review.googlesource.com/c/go/+/595495 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Than McIntosh <thanm@google.com> Reviewed-by: Sam Thanawalla <samthanawalla@google.com>
…ons for 'go list -cover' When -covermode is set to atomic, instrumented packages need to import sync/atomic. If this is not already imported by a package being instrumented, the build needs to ensure that sync/atomic is compiled whenever 'go list' is run in a way that triggers package builds. The build config was already being made to ensure the import, but only after the action graph had been created, so there was no guarantee that sync/atomic would be built when needed. For #65264. For #68212 Fixes #68222 Change-Id: Ib3f1e102ce2ef554ea08330d9db69a8c98790ac5 Reviewed-on: https://go-review.googlesource.com/c/go/+/560236 Run-TryBot: Bryan Mills <bcmills@google.com> Auto-Submit: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Bryan Mills <bcmills@google.com> Reviewed-by: Michael Matloob <matloob@golang.org> (cherry picked from commit ac08c05) Reviewed-on: https://go-review.googlesource.com/c/go/+/595496 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Than McIntosh <thanm@google.com>
Go version
go version go1.22.4 darwin/arm64
Output of
go env
in your module/workspace:What did you do?
Trying to use
go list
to obtain the exports for a given package and its dependencies; possibly built with coverage instrumentation... Use a command similar to the following (io
being a standard library package that runs into the issue, but this happens with virtually any other package that does not "already" depend onsync/atomic
):What did you see happen?
Removed
-deps
and-json
arguments as they are largely irrelevant to the issue; but basically:What did you expect to see?
I'd have expected compilation to succeed and exports to be returned (the
go build
equivalent command is successful):The text was updated successfully, but these errors were encountered: