Editions are still flag-guarded by the `--experimental_editions` flag for now, but once that's removed in a later release generators will need to explicitly specify that their support. This will avoid cases where generators may happen to work for editions but produce incorrect code.
PiperOrigin-RevId: 547959326
There are 4 different feature sets for every descriptor:
* Runtime/resolved - Used to make runtime decisions
* Source/resolved - Used to make codegen decisions
* Runtime/unresolved - Used to reason about the original proto file during runtime
* Source/unresolved - Used to validate features during codegen
Plugins will receive all 4 of these. Unresolved features will show up in the `raw_features` fields nested inside `features`. The runtime features will be in the `proto_file` field of the request, while the source features will be in the unstripped `source_file_descriptors` field.
PiperOrigin-RevId: 547925275
There are 4 different feature sets for every descriptor:
* Runtime/resolved - Used to make runtime decisions
* Source/resolved - Used to make codegen decisions
* Runtime/raw - Used to reason about the original proto file during runtime
* Source/raw - Used to validate features during codegen
All of these will need to be shipped to code generators. While C++ generators can use the C++ runtime to reconstruct these, they won't end up in the FileDescriptorProtos we send to runtimes. Similarly, non-C++ generators wouldn't be able to get them without duplicating our feature resolution logic. This change adds a helper that allows us to bundle all of these into the protos we send to generators.
PiperOrigin-RevId: 547849243
This will be used for tracking the unresolved feature sets from the original proto file. Notable use-cases for this include:
* Code generators that need to validate their own features
* Runtimes that need to be able to accurately round-trip the original protos
PiperOrigin-RevId: 547610367
MSVC compilers generate warnings that the default destructor is implicitly deleted, which causes errors on /W1. While this is a pedantic warning (error), we can easily make the deletion explicit to avoid these warnings.
PiperOrigin-RevId: 547548886
There are whatespace changes because I couldn't get some of the
generated CPreProcessor things to line up in the exact same way.
PiperOrigin-RevId: 547188309
None of these methods are necessary for users to use Optional, but they
are particularly useful and mirror the methods inside of
std::collections::hash_map::Entry.
PiperOrigin-RevId: 547038832
Minor updates to how comments are output to have a method
so folks can directly call Emit to handle multline things correctly.
PiperOrigin-RevId: 546921123
No need to say "represents" when describing a type (all types represent
something in real world, they are not the real thing), and "ABI-compatible"
needs a dash.
PiperOrigin-RevId: 546813197
Adding composer config to allow the native protobuf extension to provide ext-protobuf.
This allows libraries to require at least one protobuf implementation. If the extension is not available, it can be provided by the native package. If the extension is available but the native package is required, the native will be installed.
Importantly, for libraries which require at least one of them to be installed, composer will complain if neither is available.
Closes#13141
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/13141 from brettmc:php-provides-ext 72d3e447f3
PiperOrigin-RevId: 546312826