rules_proto
rules_proto copied to clipboard
[Bazel CI] Error compiling external protobuf source: undeclared inclusion(s) in rule
CI: https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/3807#018f03f8-b794-41df-a7d3-38707c4d2f6d
Platform: Windows
Logs:
ERROR: [0mC:/b/uhnenhph/external/protobuf~/src/google/protobuf/BUILD.bazel:70:14: Compiling external/protobuf~/src/google/protobuf/_virtual_imports/type_proto/google/protobuf/type.pb.cc failed: undeclared inclusion(s) in rule '@@protobuf~//src/google/protobuf:type_proto'
Culprit:
Steps:
git clone https://github.com/bazelbuild/rules_proto
git reset d4c3498677e7fbda6f717585276ea4d8b75acec0 --hard
export USE_BAZEL_VERSION=d37762b494a4e122d46a5a71e3a8cc77fa15aa25
bazel build //...
CC Greenteam @wyverald
This is common pain from the Bazel community as well. IMO rules_proto should stop exercising the "build protoc from source" codepath, as that's only intended for C++ projects per https://github.com/protocolbuffers/protobuf#protobuf-compiler-installation
If you want to use the github main version at HEAD, or you need to modify protobuf code, or you are using C++, it's recommended to build your own protoc binary from source.
I can make that change if the maintainers indicate a willingness to accept it.
Hi @alexeagle, Friendly ping to know the status of the above issue. Thanks!
Thanks @alexeagle for your suggestions :)
The issue has been fixed in protobuf repo.