rules_buf icon indicating copy to clipboard operation
rules_buf copied to clipboard

Don't hard-code @com_google_protobuf//:protoc

Open alexeagle opened this issue 1 year ago • 1 comments

According to https://github.com/bazelbuild/rules_proto/discussions/213 users of Bazel 7 can now ask Bazel to resolve protoc from a toolchain.

There are two spots at HEAD:

 "_protoc": attr.label(
    default = "@com_google_protobuf//:protoc",
    executable = True,
    cfg = "exec",
),

alexeagle avatar May 29 '24 00:05 alexeagle

This change would be highly appreciated. We have recently migrated to using Aspect Build's kindly-provided pre-compiled protoc toolchain (toolchains_protoc) (which seems to be the recommended approach since the new versions of rules_go, and deprecation of rules_proto) , which has sped-up all our processed significantly.

Relying on rules_buf would force us to re-introduce compilation of protoc from scratch, which is something we cannot really afford to do (any more).

It would be great if we could leverage the registered toolchain instead.

momilo avatar Aug 29 '24 18:08 momilo