Repository navigation
Add [golang].third_party_target_generation = imported (closes #20340)
#23665
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
Merged
benjyw
merged 11 commits into
pantsbuild:main
from
aegis-cipherowl:henry-yang/upstream/import-scoped-target-generation
Oct 9, 2026
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
85cc9db
Key Go module downloads on `cgo_enabled`, not all of `GoBuildOptions`
aegis-cipherowl 20cf3bb
Add release note for the module download key narrowing
aegis-cipherowl a77c32d
Report constraint-free imports from the Go package analyzer
aegis-cipherowl 99c2cf4
Add the first-party import root scan for import-scoped target generation
aegis-cipherowl 1fc7f47
Add `[golang].third_party_target_generation = imported`
aegis-cipherowl 6fdc8ea
Contribute codegen import roots so `imported` mode supports Protobuf
aegis-cipherowl 5adb776
Adopt the rule-call convention at the new call sites, and add a relea…
aegis-cipherowl ed1c8f9
Merge remote-tracking branch 'upstream/main' into henry-yang/upstream…
aegis-cipherowl e7d403e
Address review feedback
aegis-cipherowl 87874a1
Split `tool` directive support out of this PR
aegis-cipherowl 30292e9
Adopt the rule-call convention at the remaining call sites
aegis-cipherowl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using the Pants-internal
help_textfunction instead ofsoftwrapshould allow you to avoid the backslash-continued lines.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaving this one open for you, since I did not do quite what you suggested.
help_textdoes not typecheck forEnumOption: it returnsstr | Callable[[], str],EnumOptionexpectsCallable[[Any], Any] | str, and mypy rejects it. Its docstring says it exists because "mypy does not respect the type hints defined on baseFieldandTargetclasses" — and noEnumOptionin the tree uses it.The backslash continuations are gone regardless:
softwrappreserves indented bullet blocks on its own (same shape as[go-test].coverage_mode), so they were never needed. Verified the renderedpants help golangstill shows the bullets correctly.Happy to go another way if you had a different form in mind.