Skip to content

How to specify "binary=True" in go_repo like in go_module #3327

Answered by chrisnovakovic
linuxerwang asked this question in Q&A
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.