Skip to content
\n

Thanks!

","upvoteCount":1,"answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"

Assuming protobuf is defined in third_party/go/BUILD as follows:

\n
## third_party/go/BUILD\n\ngo_repo(\n    name = \"google.golang.org_protobuf\",\n    module = \"google.golang.org/protobuf\",\n    # ...\n)\n
\n

go_repo defines a subrepo, so the binary is already a distinct target in the build graph - the target's name is based on the structure of the Go module, so protoc-gen-go would be ///third_party/go/google.golang.org_protobuf//cmd/protoc-gen-go.

","upvoteCount":1,"url":"https://github.com/thought-machine/please/discussions/3327#discussioncomment-11820307"}}}
Discussion options

You must be logged in to vote

Assuming protobuf is defined in third_party/go/BUILD as follows:

## third_party/go/BUILD

go_repo(
    name = "google.golang.org_protobuf",
    module = "google.golang.org/protobuf",
    # ...
)

go_repo defines a subrepo, so the binary is already a distinct target in the build graph - the target's name is based on the structure of the Go module, so protoc-gen-go would be ///third_party/go/google.golang.org_protobuf//cmd/protoc-gen-go.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by linuxerwang
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #3326 on January 13, 2025 13:56.