This is some low hanging fruit that can increase our test coverage of editions. Since only the C++ backend is implemented today, we can't yet migrate any protos that are public, are used outside C++, or are depended on by any proto outside C++.
PiperOrigin-RevId: 546076822
If you are running an older version of PHP, you can install a previous release
of the protobuf PHP extension by running pecl install protobuf-3.23.3.
PiperOrigin-RevId: 546056449
This replaces the cc_utf8_verification and enforce_utf8 options with the corresponding feature values, consistent with C++ behavior. Further runtimes will be supported by refactoring the string_field_validation feature in a later change.
PiperOrigin-RevId: 545824813
Generated map messages should inherit features from the original field, not the containing message. To do this, we copy *all* features from the original field to the generated ones, and disable explicit feature validation for them.
Additionally, this change fixes some bugs in the error handling of explicitly set features. String map fields should be allowed to use `string_field_validation`, and uninterpreted feature options in the proto should still be recognized for validation.
PiperOrigin-RevId: 545747503
These are designed to only run once daily in "quiet" hours to avoid race conditions. While isn't very harmful, it does cause our monitoring to show an artificial increase in flakes.
PiperOrigin-RevId: 544883830
This represents the future direction of protobuf, replacing proto2/proto3 syntax with editions. These will enable more incremental evolution of protobuf APIs through features, which are individual behaviors (such as whether field presence is explicit or implicit). For more details see https://protobuf.dev/editions/overview/.
This PR contains a working implementation of editions for the protoc frontend and C++ code generation, along with various infrastructure improvements to support it. It gives early access for anyone who wants to a preview of editions, but has no effect on proto2/proto3 syntax. It is flag-guarded behind the `--experimental_editions` flag, and is an experimental feature with no guarantees.
PiperOrigin-RevId: 544805690
It's not clear what happens if both C++17/C++20 and C++14 are specified, so it's possible this was effectively disabling those tests.
PiperOrigin-RevId: 544763031
This handles conversion from descriptors to MessageInfo in a single generic codepath that handles the following differences across syntaxes:
- Enum closedness (proto2)
- Explicit (proto2) vs implicit (proto3) presence
- Required field initialization (proto2)
- UTF8 (proto2/3 specific options)
This also fixes proto3 non-optional messages to encode hasbit, which was updated in cl/542744002
PiperOrigin-RevId: 544358617
We were always emitting Optional<T> for accessors, when they should've been behind `_opt`.
We've refactored our previous accessor into `getter` and `getter_opt`. We'll only emit `getter_opt` when we're dealing with optional fields.
PiperOrigin-RevId: 544087591
Needed to lowercase fieldnames and add underscores when they use protected cpp names. Ended up using `cpp::FieldName` from the cpp impl to get this for free.
Also added escaping to Rust accessors, so that protected keywords will compile.
PiperOrigin-RevId: 543995050