Changes announced on December 5, 2023
Java Breaking Changes
The following sections outline the set of breaking changes that we plan to include in the 26.0 release of protocol buffers. Note that plans can and do change. These are potential breaking changes to be aware of, but they may not happen in this particular release, or they may not happen at all.
Poison Pilling Gencode / Runtime Mismatches
Per our Cross-Version Runtime Guarantees, Protobuf does not support mixing generated code and runtimes across major version boundaries, or mixing generated code from a newer version of protoc with older runtimes within a single major runtime version. We plan to introduce “poison pills” to detect and enforce these disallowed mismatches.
This is not considered a breaking change since this simply adds enforcement of existing policies, but may require users to update their generated code.
Breaking Compatibility with Old Generated Code
v26.x will break compatibility with generated code from older major versions. Users should regenerate old generated code to be from the same version.
GeneratedMessageV3, which was originally introduced for backwards
compatibility with generated code from v2.x.x against v3.x.x runtime, will be
GeneratedMessage. Runtimes will be updated to support
Editions, which will not be
compatible with old generated code.
This is in accordance with our existing Cross-Version Runtime Guarantees and is a breaking change.
Removing Deprecated Methods/Variables
v26.x will remove access to deprecated methods and variables. These will
generally have already been marked
@Deprecated in a previous release.
This will remove access to the following non-exhaustive list:
Descriptor syntax APIs, which should be replaced with corresponding feature accessors (such as
TextFormat print methods, which should be replaced by corresponding
PARSER variable, which should be replaced by the
Runtime methods for old v2.x.x gencode compatibility. This is no longer supported, as per our Cross Version Runtime Guarantees.
More details will be available in the corresponding release notes.