Skip to content

Commit 101c968

Browse files
committed
refactor: register the pre-built protoc toolchain
Following discussions in buildbarn/bb-storage#248 we must register the toolchain as well. I don't know if this was always an oversight or the behavior changed.
1 parent a26c16b commit 101c968

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

MODULE.bazel

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,15 @@ bazel_dep(name = "rules_shell", version = "0.3.0")
2929
# but held back to be compatible with bb-remote-execution.
3030
bazel_dep(name = "rules_proto", version = "7.1.0")
3131
bazel_dep(name = "toolchains_llvm", version = "1.3.0")
32-
bazel_dep(name = "toolchains_protoc", version = "0.3.4")
32+
bazel_dep(name = "toolchains_protoc", version = "0.4.2")
33+
34+
# Mirror the protoc setup from bb-storage: https://github.com/buildbarn/bb-storage/pull/248
35+
# NB: Match protobuf above, until it ships a pre-built binary toolchain itself
36+
protoc = use_extension("@toolchains_protoc//protoc:extensions.bzl", "protoc")
37+
protoc.toolchain(version = "v29.3")
38+
use_repo(protoc, "toolchains_protoc_hub")
39+
40+
register_toolchains("@toolchains_protoc_hub//:all")
3341

3442
# # Workarounds 2024-06-27
3543
# ERROR: in tag at https://bcr.bazel.build/modules/grpc-java/1.62.2/MODULE.bazel:89:15: no repository visible as '@com_google_protobuf_javalite' to the repository '@@grpc-java~', but referenced by label '@com_google_protobuf_javalite//:protobuf_javalite' in attribute 'target' of tag 'override'. Is the module 'grpc-java' missing a bazel_dep or use_repo(..., "com_google_protobuf_javalite")?

0 commit comments

Comments
 (0)