@@ -223,11 +223,43 @@ This release will remove the following public runtime APIs.
223223
224224** Replacement:** Use ` !required && fieldType == GPBFieldTypeSingle ` instead.
225225
226- ## Other Changes {#other-changes }
226+ ## Changes in Bazel {#bazel }
227227
228- The following are additional breaking changes.
228+ ### Migration of Proto Flags to Starlark {#bazel-starlark-flags}
229+
230+ ` --proto_toolchain_for* ` and ` --proto_compiler ` are no longer read by Proto
231+ rules. These toolchain-related flags are deprecated and will be removed in the
232+ future. Switching to the equivalent Starlark flags is a short-term fix:
233+
234+ * ` --@protobuf//bazel/flags/cc:proto_toolchain_for_cc `
235+ * ` --@protobuf//bazel/flags/java:proto_toolchain_for_java `
236+ * ` --@protobuf//bazel/flags/java:proto_toolchain_for_javalite `
237+ * ` --@protobuf//bazel/flags:proto_compiler `
238+
239+ The longer-term fix is to enable
240+ ` --incompatible_enable_proto_toolchain_resolution ` (which is the default in
241+ Bazel 9 anyway) and to register toolchains using the normal platforms-related
242+ mechanisms (` register_toolchain() ` in ` MODULE.bazel ` or ` WORKSPACE ` , or
243+ ` --extra_toolchains ` ).
244+
245+ All other Bazel Proto flags have also been migrated to Starlark, and the native
246+ flags will be deprecated with the next Bazel release. Use the following Starlark
247+ flags to avoid future breakages:
229248
230- ### Bazel: Remove deprecated ProtoInfo.transitive_imports {#bazel-transitive-imports}
249+ * ` --@protobuf//bazel/flags:strict_proto_deps `
250+ * ` --@protobuf//bazel/flags:strict_public_imports `
251+ * ` --@protobuf//bazel/flags:experimental_proto_descriptor_sets_include_source_info `
252+ * ` --@protobuf//bazel/flags/cc:cc_proto_library_header_suffixes `
253+ * ` --@protobuf//bazel/flags/cc:cc_proto_library_source_suffixes `
254+ * ` --@protobuf//bazel/flags:protocopt `
255+
256+ ** NOTE:** In v34.0, ` --@protobuf//bazel/flags:protocopt ` was incorrectly located
257+ at ` --@protobuf//bazel/flags/cc:protocopt ` . The flag will be moved to its
258+ correct location, and the ` cc ` location will remain as a deprecated alias
259+ starting in v34.1. This alias should not be used and will be removed in the next
260+ breaking change.
261+
262+ ### Remove deprecated ProtoInfo.transitive_imports {#bazel-transitive-imports}
231263
232264The deprecated ` transitive_imports ` field in ` ProtoInfo ` will be removed. Users
233265should migrate to ` transitive_sources ` .
@@ -237,6 +269,10 @@ should migrate to `transitive_sources`.
237269Due to Bazel's recent improvements on Windows, we now plan to continue to
238270support Bazel+MSVC. The ` --define=protobuf_allow_msvc ` flag will be removed.
239271
272+ ## Other Changes {#other-changes}
273+
274+ The following are additional breaking changes.
275+
240276### Languages Without a Major Version Bump
241277
242278Java, Ruby, C#, Rust, and JRuby will not have a major version bump in this
0 commit comments