-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: cannot find package
when importing dependencies with the unix
build constraint
#54712
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
Comments
Change https://go.dev/cl/426296 mentions this issue: |
It seems that https://go.dev/cl/389934 forgot to change |
It does if you add a |
cannot find package
when importing dependencies with the unix
build constraint
@gopherbot, please backport to Go 1.19. This is a subtle bug in a feature introduced in Go 1.19, and the fix in Go 1.20 will mask spurious build failures that users on Go 1.19 will run into. |
Backport issue(s) opened: #54736 (for 1.19), #54737 (for 1.20). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases. |
Change https://go.dev/cl/426814 mentions this issue: |
…ld tag For #20322 For #51572 Updates #54712 Fixes #54736 Change-Id: I22fcfa820e83323bfdf1a40deee7286240f02b3e GitHub-Last-Rev: cd2c653 GitHub-Pull-Request: #54716 Reviewed-on: https://go-review.googlesource.com/c/go/+/426296 Run-TryBot: Heschi Kreinick <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Heschi Kreinick <[email protected]> Reviewed-by: Bryan Mills <[email protected]> (cherry picked from commit 3c6a5cd) Reviewed-on: https://go-review.googlesource.com/c/go/+/426814 Run-TryBot: Bryan Mills <[email protected]>
…ld tag For golang#20322 For golang#51572 Updates golang#54712 Fixes golang#54736 Change-Id: I22fcfa820e83323bfdf1a40deee7286240f02b3e GitHub-Last-Rev: cd2c653 GitHub-Pull-Request: golang#54716 Reviewed-on: https://go-review.googlesource.com/c/go/+/426296 Run-TryBot: Heschi Kreinick <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Heschi Kreinick <[email protected]> Reviewed-by: Bryan Mills <[email protected]> (cherry picked from commit 3c6a5cd) Reviewed-on: https://go-review.googlesource.com/c/go/+/426814 Run-TryBot: Bryan Mills <[email protected]>
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
I don't know if this reproduces in gotip.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
https://go.dev/play/p/vhnTI8FhFJE
Doesn't reproduce in the playground.
What did you expect to see?
My program runs.
What did you see instead?
main.go:6:2: cannot find package
If I change
unix
tolinux
, it works.If I remove the build constraint, it works.
If I remove the references to
golang.org/x/sync/singleflight
, it works.Per
go help buildconstraint
:The text was updated successfully, but these errors were encountered: