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

go: allow exporting cgo codegen for third party packages #17770

Merged
merged 1 commit into from
Dec 10, 2022

Conversation

tdyas
Copy link
Contributor

@tdyas tdyas commented Dec 10, 2022

The go-export-cgo-codegen debug goal was unnecessarily limited to exporting just Cgo codegen for first-party go_package targets. As part of fixing #17592, it is useful to also be able to dump Cgo codegen for any third-party packages using Cgo. This PR teaches go-export-cgo-codegen how to do that.

@tdyas tdyas added backend: Go Go backend-related issues category:internal CI, fixes for not-yet-released features, etc. labels Dec 10, 2022
@benjyw
Copy link
Contributor

benjyw commented Dec 10, 2022

In the future could go-export-cgo-codegen be folded into export-codegen? (which I want to fold into export in the further future...)

@tdyas
Copy link
Contributor Author

tdyas commented Dec 10, 2022

In the future could go-export-cgo-codegen be folded into export-codegen? (which I want to fold into export in the further future...)

Maybe? go-export-cgo-codegen doesn't use the codegen rules though despite the word "codegen" in the name. Doesn't seem worth the trouble to do so, might as well just port to export directly at that point.

Also is export intended for debug goals? Exporting a venv does not seem like "debugging" while dumping Cgo outputs is really only for Pants developers in my view.

@tdyas tdyas merged commit 1f8170d into pantsbuild:main Dec 10, 2022
@tdyas tdyas deleted the golang_fix_cgo_debug_goal branch December 10, 2022 11:30
@stuhood stuhood mentioned this pull request Dec 17, 2022
stuhood added a commit that referenced this pull request Dec 17, 2022
### Internal

* Get rid of `_ToolLockfileMixin`. ([#17823](#17823))

* Fix `build-support/bin/deploy_to_s3.py`. ([#17818](#17818))

* Upgrade setproctitle to 1.3.2 ([#17804](#17804))

* Document the release tag back-fill script. ([#17808](#17808))

* Add a release tag backfill script. ([#17806](#17806))

* Set up release tag mapping workflow. ([#17801](#17801))

* go: fix path lookup for copied header files ([#17798](#17798))

* go: set `replace_sandbox_root_in_args=True` since replacement is used ([#17797](#17797))

* go: set missing `Goal.environment_behavior` on a debug goal ([#17799](#17799))

* go: rename option to --go-test-coverage-packages ([#17795](#17795))

* A stub page for dep validation docs. ([#17788](#17788))

* Upgrade to newest remote execution proto ([#17786](#17786))

* Adding tests for `cc` dependency inference showing source roots as `include_directories` ([#17738](#17738))

* Fix validation of release PEXes. ([#17785](#17785))

* Unconditionally register export-codegen goal in pants.core ([#17782](#17782))

* go: allow exporting cgo codegen for third party packages ([#17770](#17770))

* Properly set `pex_root` when running python sources in-sandbox. ([#17750](#17750))

* Renames `output_files` and `output_directories` fields for `experimental_shell_command` ([#17744](#17744))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend: Go Go backend-related issues category:internal CI, fixes for not-yet-released features, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants