You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Once the rules are in the protobuf repo, we intend to address common user requests, such as using prebuilts for the proto compiler where possible.
This is that request.
What language does this apply to?
All
Describe the problem you are trying to solve.
All Bazel users are expected to build protoc from source as a cc_binary. This leads to problems which are often reported on the Bazel Slack:
Bazel doesn't include a hermetic C++ toolchain, so the compilation fails for a subset of developers due to the host toolchain on their computer. This can be easily reproduced by registering a non-functional toolchain. Many users have no C++ code, so they have no benefit from dealing with this hermeticity failure other than to repair protoc.
protoc frequently gets recompiled rather than being a cache hit - example report, issue. This makes Bazel builds slow.
Describe the solution you'd like
Bazel's toolchain feature allows it to download the pre-built binaries from protobuf releases
bazelbuild/rules_proto#205 was part of my earlier work to provide this capability. The ruleset mirrors its own integrity hashes as part of each release.
Yes, we have changes pending to provide prebuilt protocs in the open source realm. I don't have the exact timeline tho; currently expecting for H1 2025
From https://protobuf.dev/news/2024-10-01/#end-goal:
This is that request.
What language does this apply to?
All
Describe the problem you are trying to solve.
All Bazel users are expected to build
protoc
from source as acc_binary
. This leads to problems which are often reported on the Bazel Slack:protoc
.protoc
frequently gets recompiled rather than being a cache hit - example report, issue. This makes Bazel builds slow.Describe the solution you'd like
Bazel's toolchain feature allows it to download the pre-built binaries from protobuf releases
bazelbuild/rules_proto#205 was part of my earlier work to provide this capability. The ruleset mirrors its own integrity hashes as part of each release.
https://github.com/aspect-build/toolchains_protoc/ is a user-land implementation of this proposal, however it was broken by changes in Bazel 8 and rules_proto described by https://protobuf.dev/news/2024-10-01/.
Additional context
Some user reports:
I describe some GitHub Actions workflows for automating this pattern on https://blog.aspect.build/releasing-bazel-rulesets-rust (and the earlier https://blog.aspect.build/releasing-bazel-rulesets)
The text was updated successfully, but these errors were encountered: