This change is a pure refactoring and simplification of the code. We replace all MapsWith<TYPE>KeyOps traits through a single generic ProxiedInMapValue<K> trait. Through connecting the runtime maps implementation with Proxied the code gets a lot simpler e.g. we can use View<T> instead of hardcoding the concrete type behind it.
I also expect this change to be beneficial for the gencode. In a subsequent CL we'll implement message values for maps. After this change we'll only have to implement a single trait, while before we had to implement num(key types) many traits.
PiperOrigin-RevId: 596562909
Note that this change removes the use of ${$ and $}$ in
the body of a template `clear` method. These brackets are
currently unused (there's no Annotate call and the variables are
set to the empty string); it also shouldn't be necessary to
annotate non-definitions.
PiperOrigin-RevId: 596254156
The absolute address of a member is unstable and can be invalidated by changes to other
fields. For example, for split fields.
PiperOrigin-RevId: 596072639
This guarantees that no matter how you get the instance we pin the type on any
use.
Previously, casting a `Message*` to some generated type and calling methods on it could trigger undefined behavior unless the cast is down via the ones provided by the library (eg `DownCastToGenerated`).
PiperOrigin-RevId: 596066250
This bug arises only in the uncommon case where there is more than one DescriptorPool. In such a case, JSON encode/decode should always use the pool of the message being encoded/decoded, not the generated pool.
Closes#15281
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/15281 from protocolbuffers:ruby-json-pool-fix 91e2dc55dc
PiperOrigin-RevId: 596027770
Include AddFileDescriptor, AddDescriptor, AddEnumDescriptor,
AddExtensionDescriptor, AddServiceDescriptor.
Those Deprecated APIs may add unlinked descriptors to descriptor_pool which is
is wrong. Should use Add() or AddSerializedFile() instead. Those APIs were
raising deprecated warnings since 2019
PiperOrigin-RevId: 595831718
`bind()` targets are deprecated and unsupported with Bzlmod. Specifying the dependency directly as a mitigation.
Alternative: Define an `alias()` within `/third_party/BUILD`.
Closes#15236
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/15236 from mering:alias-python-headers 801ac73313
PiperOrigin-RevId: 595737575
std::to_address uses this function to "Obtain the address without forming a reference", so it might get surprised if it forms a reference in the process.
PiperOrigin-RevId: 595705426