Skip to content
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

Closed
wants to merge 3 commits into from
Closed

cmd/cgo: clarify implicit "cgo" build constraint #24072

wants to merge 3 commits into from

Conversation

ikkerens
Copy link
Contributor

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.

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.
@googlebot
Copy link

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. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers
  • Your company has a Point of Contact who decides which employees are authorized to participate. Ask your POC to be added to the group of authorized contributors. If you don't know who your Point of Contact is, direct the project maintainer to go/cla#troubleshoot.
  • The email used to register you as an authorized contributor must be the email used for the Git commit. Check your existing CLA data and verify that your email is set on your git commits.
  • The email used to register you as an authorized contributor must also be attached to your GitHub account.

@googlebot googlebot added the cla: no Used by googlebot to label PRs as having an invalid CLA. The text of this label should not change. label Feb 23, 2018
@ikkerens
Copy link
Contributor Author

I signed it!

@googlebot
Copy link

CLAs look good, thanks!

@googlebot googlebot added cla: yes Used by googlebot to label PRs as having a valid CLA. The text of this label should not change. and removed cla: no Used by googlebot to label PRs as having an invalid CLA. The text of this label should not change. labels Feb 23, 2018
@gopherbot
Copy link
Contributor

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 comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from Gobot Gobot:

Patch Set 1:

Congratulations on opening your first change. Thank you for your contribution!

Next steps:
Within the next week or so, a maintainer will review your change and provide
feedback. See https://golang.org/doc/contribute.html#review for more info and
tips to get your patch through code review.

Most changes in the Go project go through a few rounds of revision. This can be
surprising to people new to the project. The careful, iterative review process
is our way of helping mentor contributors and ensuring that their contributions
have a lasting impact.

During May-July and Nov-Jan the Go project is in a code freeze, during which
little code gets reviewed or merged. If a reviewer responds with a comment like
R=go1.11, it means that this CL will be reviewed as part of the next development
cycle. See https://golang.org/s/release for more details.


Please don’t reply on this GitHub thread. Visit golang.org/cl/96655.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Ian Lance Taylor:

Patch Set 1:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/96655.
After addressing review feedback, remember to publish your drafts!

A change suggested by @ianlancetaylor on gerrit, provides a more direct and clear message for the documentation.
@gopherbot
Copy link
Contributor

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 comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from Rens Rikkerink:

Patch Set 2:

Patch Set 1:

(1 comment)

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.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Ian Lance Taylor:

Patch Set 2:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/96655.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

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 comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

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.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

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.
After addressing review feedback, remember to publish your drafts!

gopherbot pushed a commit that referenced this pull request Feb 26, 2018
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]>
@ikkerens
Copy link
Contributor Author

Closing as this has been merged.

@ikkerens ikkerens closed this Feb 27, 2018
@ianlancetaylor
Copy link
Contributor

CC @andybons: how come this pull request had to be explicitly closed, and was not automatically closed when I submitted the issue in Gerrit?

@andybons
Copy link
Member

Hm. It should have been closed by GerritBot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Used by googlebot to label PRs as having a valid CLA. The text of this label should not change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants