Skip to content

Commit 9604bbe

Browse files
committed
Use a prebuilt version of protoc
We already do this in bb-storage. I think it makes sense to do it here as well, so that the build runs faster.
1 parent c4195a9 commit 9604bbe

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

.bazelrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
run --workspace_status_command="bash tools/workspace-status.sh"
2+
common --incompatible_enable_proto_toolchain_resolution

MODULE.bazel

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ bazel_dep(name = "gazelle", version = "0.43.0")
1111
bazel_dep(name = "googleapis", version = "0.0.0-20241220-5e258e33.bcr.1")
1212
bazel_dep(name = "jsonnet_go", version = "0.21.0")
1313
bazel_dep(name = "platforms", version = "1.0.0")
14+
bazel_dep(name = "toolchains_protoc", version = "0.4.2") # must come BEFORE protobuf so the toolchain registration wins
1415
bazel_dep(name = "protobuf", version = "31.1")
1516
bazel_dep(name = "rules_go", version = "0.55.1")
1617
bazel_dep(name = "rules_jsonnet", version = "0.6.0")
@@ -57,6 +58,9 @@ git_override(
5758
remote = "https://github.com/marcohu/rules_antlr.git",
5859
)
5960

61+
protoc = use_extension("@toolchains_protoc//protoc:extensions.bzl", "protoc")
62+
protoc.toolchain(version = "v31.1")
63+
6064
go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk")
6165
go_sdk.download(
6266
patches = ["//:patches/go_sdk/x25519.diff"],

0 commit comments

Comments
 (0)