-
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/cgo: clarify implicit "cgo" build constraint #24072
Conversation
When using the special import "C", the "cgo" build constraint is implied for the go file, potentially triggering unclear "undefined" error messages. The documentation so far did not yet mention this.
Thanks for your pull request. t looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
|
I signed it! |
CLAs look good, thanks! |
This PR (HEAD: 2a298db) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/#/c/go/+/96655 to see it. Tip: You can toggle comments from me using the |
Message from Gobot Gobot: Patch Set 1: Congratulations on opening your first change. Thank you for your contribution! Next steps: Most changes in the Go project go through a few rounds of revision. This can be During May-July and Nov-Jan the Go project is in a code freeze, during which Please don’t reply on this GitHub thread. Visit golang.org/cl/96655. |
Message from Ian Lance Taylor: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/96655. |
A change suggested by @ianlancetaylor on gerrit, provides a more direct and clear message for the documentation.
This PR (HEAD: 0bf7571) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/#/c/go/+/96655 to see it. Tip: You can toggle comments from me using the |
Message from Rens Rikkerink: Patch Set 2:
I've pushed the change as I agree with the more direct approach. Please don’t reply on this GitHub thread. Visit golang.org/cl/96655. |
Message from Ian Lance Taylor: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/96655. |
This PR (HEAD: 5a13f00) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/#/c/go/+/96655 to see it. Tip: You can toggle comments from me using the |
Message from Gerrit Bot: Uploaded patch set 4: Commit message was updated. Please don’t reply on this GitHub thread. Visit golang.org/cl/96655. |
Message from Ian Lance Taylor: Patch Set 5: Commit message was updated. Please don’t reply on this GitHub thread. Visit golang.org/cl/96655. |
When using the special import "C", the "cgo" build constraint is implied for the go file, potentially triggering unclear "undefined" error messages. Explicitly explain this in the documentation. Updates #24068 Change-Id: Ib656ceccd52c749ffe7fb2d3db9ac144f17abb32 GitHub-Last-Rev: 5a13f00 GitHub-Pull-Request: #24072 Reviewed-on: https://go-review.googlesource.com/96655 Reviewed-by: Ian Lance Taylor <[email protected]>
Closing as this has been merged. |
CC @andybons: how come this pull request had to be explicitly closed, and was not automatically closed when I submitted the issue in Gerrit? |
Hm. It should have been closed by GerritBot. |
When using the special import "C", the "cgo" build constraint is implied for the go file, potentially triggering unclear "undefined" error messages. The documentation so far did not yet mention this.
Updates #24068, adds the instructed "quick win" as a more helpful message from the compiler is non-trivial.