With Bazel 9.0 and onwards, rules must be explicitly loaded in the associated BUILD files with the published proto:
load("@com_google_protobuf//bazel:java_proto_library.bzl", "java_proto_library")
load("@com_google_protobuf//bazel:proto_library.bzl", "proto_library")
// And other rules used
With Bazel 9.0 and onwards, rules must be explicitly loaded in the associated BUILD files with the published proto:
Example: https://github.com/google/cel-spec/blob/master/proto/cel/expr/conformance/test/BUILD.bazel is missing:
--incompatible_autoload_externallycan be used as a workaround, but this flag will be removed in Bazel 10.https://blog.bazel.build/2026/01/20/bazel-9.html