Changes Announced on March 13, 2026

Changes announced for Protocol Buffers on March 13, 2026.

Changes in Bazel

Migration of Proto Flags to Starlark

--proto_toolchain_for* and --proto_compiler are no longer read by Proto rules. These toolchain-related flags are deprecated and will be removed in the future. Switching to the equivalent Starlark versions of the flags is a short-term fix:

  • --@protobuf//bazel/flags/cc:proto_toolchain_for_cc
  • --@protobuf//bazel/flags/java:proto_toolchain_for_java
  • --@protobuf//bazel/flags/java:proto_toolchain_for_javalite
  • --@protobuf//bazel/flags:proto_compiler

The longer-term fix is to enable --incompatible_enable_proto_toolchain_resolution (which is the default in Bazel 9 anyway) and to register toolchains using the normal platforms-related mechanisms (register_toolchain() in MODULE.bazel or WORKSPACE, or --extra_toolchains).

All other Bazel Proto flags have also been migrated to Starlark, and the native flags will be deprecated with the next Bazel release. Use the following Starlark flags to avoid future breakages:

  • --@protobuf//bazel/flags:strict_proto_deps
  • --@protobuf//bazel/flags:strict_public_imports
  • --@protobuf//bazel/flags:experimental_proto_descriptor_sets_include_source_info
  • --@protobuf//bazel/flags/cc:cc_proto_library_header_suffixes
  • --@protobuf//bazel/flags/cc:cc_proto_library_source_suffixes
  • --@protobuf//bazel/flags:protocopt

NOTE: In v34.0, --@protobuf//bazel/flags:protocopt was incorrectly located at --@protobuf//bazel/flags/cc:protocopt. The flag will be moved to its correct location, and the cc location will remain as a deprecated alias starting in v34.1. This alias should not be used and will be removed in the next breaking change.