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

Support incompatible_enable_proto_toolchain_resolution #2627

Open
alexeagle opened this issue Apr 23, 2024 · 3 comments
Open

Support incompatible_enable_proto_toolchain_resolution #2627

alexeagle opened this issue Apr 23, 2024 · 3 comments
Labels

Comments

@alexeagle
Copy link
Contributor

Currently rules_rust requires the user to override the protoc compiler

default = Label("@com_google_protobuf//:protoc"),

with a fixed label to replace it.

However Bazel 7 introduced --incompatible_enable_proto_toolchain_resolution and rules_proto 6.0 allows users to register a toolchain for protoc. The toolchain_type is @rules_proto//proto:toolchain_type: https://github.com/bazelbuild/rules_proto/blob/6.0.0-rc3/proto/BUILD#L57-L60

https://registry.bazel.build/modules/toolchains_protoc is a reference implementation and has examples

Similar change in other language rules:

@aran
Copy link

aran commented Apr 29, 2024

@UebelAndre maybe? Is this something that would be welcome in rules_rust to help avoid protoc compilation times for rust users?

@illicitonion
Copy link
Collaborator

I would happily review a PR adding this support :)

@UebelAndre
Copy link
Collaborator

@UebelAndre maybe? Is this something that would be welcome in rules_rust to help avoid protoc compilation times for rust users?

Hey! It'd definitely be welcome! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants