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

Need ability to specify other versions of protoc #73

Open
gibfahn opened this issue Nov 18, 2020 · 4 comments
Open

Need ability to specify other versions of protoc #73

gibfahn opened this issue Nov 18, 2020 · 4 comments
Labels
P3 We're not considering to work on this, but happy to review a PR. (No assignee)

Comments

@gibfahn
Copy link

gibfahn commented Nov 18, 2020

Many tools require us to specify other versions of protoc than the default that comes with the ruleset, and it would be really nice to be able to specify that in the arguments to the rules_proto setup.

The biggest issue with this is specifying the sha256s, rules_go does this by having a checked-in list: sdk_list.bzl

Previously this was possibly by simply specifying your own com_google_protobuf http_archive before setting up rules_proto, but now you have to override all of the dependencies in dependencies.bzl.

@gibfahn
Copy link
Author

gibfahn commented Dec 15, 2020

Update, rules_go moved to downloading this each time: bazel-contrib/rules_go#2729

@avdv
Copy link

avdv commented Apr 6, 2021

Hi.

In a similar way, is it possible to avoid using the binaries for my current system?

Reason is that the binaries do not work:

/run/user/1000/.cache/bazel/_bazel_claudio/d8784845802f85734743b59142c4faef/external/com_github_protocolbuffers_protobuf/BUILD:354:15: 
  Generating Descriptor Set proto_library @com_github_protocolbuffers_protobuf//:source_context_proto failed (Exit 1): 

  protoc.exe failed: error executing command bazel-out/host/bin/external/com_google_protobuf_protoc_linux_x86_64/protoc.exe '--proto_path=bazel-out/k8-fastbuild/bin/external/com_github_protocolbuffers_protobuf/_virtual_imports/source_context_proto' ... (remaining 6 argument(s) skipped)

How can I force the rules to skip the select? TIA!

@comius comius added the P3 We're not considering to work on this, but happy to review a PR. (No assignee) label Feb 8, 2022
@comius
Copy link
Collaborator

comius commented Feb 8, 2022

Toolchainisation of protoc should make this possible.

@mellery451
Copy link

Hi,

can someone help me understand the current options for using a specific version/repository of protoc with rules_proto? I see there is a bazel command line flag --proto_compiler ...does that work and if so, what else is this issue trying to solve? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 We're not considering to work on this, but happy to review a PR. (No assignee)
Projects
None yet
Development

No branches or pull requests

4 participants