Don't hard-code @com_google_protobuf//:protoc
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",
),
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.