With some optimizer flags, GPBCodedOutputStream results in a lot of
code bloat, for now just prevent the new helper related to
NSOutputStream from being inlined to keep that in check.
PiperOrigin-RevId: 554525631
When build a FileDescriptorProto into pool, FieldDescriptorProto.type may not set if type_name is set. This only add tests. UPB python Fix has been submit in other change
PiperOrigin-RevId: 554516745
Add some missing endian conversions so that the conformance tests can be run on big endian platforms.
The message length value created by the conformance test runner is little endian according to the comments in the file but actually was sent in the native endianness of the host. I was able to run the java, python, ruby, php and csharp test executables and they all expect little endian length values so those tests would hang on big endian machines. Only the cpp test executable was using native endian so it has been changed to expect little endian too.
Also change the fixed32 and fixed64 functions in binary_json_conformance_test_suite.cc to send the data as little endian which fixes some failures in the python conformance tests on big endian platforms.
Closes#13443
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/13443 from linux-on-ibm-z:conformance-runner-little-endian-fix 4ef7948997
PiperOrigin-RevId: 553958649
Change the pack/unpack format codes 'f' -> 'g' and 'd' -> 'e' which ensure little endian format is used on the wire regardless of machine endianness. This allows the php composer and conformance tests to pass on big endian platforms and should not change any behavior on little endian platforms.
According to the PHP documentation, 'g' and 'e' were added in PHP versions 7.0.15 and 7.1.1.
Closes#13444
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/13444 from linux-on-ibm-z:php-endian-fix 7840e09755
PiperOrigin-RevId: 553954880
This CL adds function bodies for: {as_view, into_view, as_mut, into_mut, set_on} [1].
Our prior cl/552609955 didn't have `RawMessage` inside $Msg$Mut, so that's also been rectified in this CL.
[1] Everything in this set is a part of the Proxied trait, except set_on, which belongs to the SettableValue trait.
PiperOrigin-RevId: 553935803
do them only once at the beginning instead of for each element.
In the past we hoisted the `rep` checks. This change continues that pattern.
PiperOrigin-RevId: 553901961
A write succeed but only write out a subset of the requested amount
of data, handle that via a helper that will loop and advance as need
to completely write out the data.
PiperOrigin-RevId: 553516360
This flag will be set in UPB which will be submitted separately due to version skew between repos.
This attempts to fix the following error from local and release settings both matching.
```
ERROR: /workspace/_build/out/external/upb/python/dist/BUILD.bazel:251:9: Illegal ambiguous match on configurable attribute "platform" in @upb//python/dist:binary_wheel:
@upb//python/dist:linux_x86_64_local
@upb//python/dist:windows_x86_64
Multiple matches are not allowed unless one is unambiguously more specialized or they resolve to the same value. See https://bazel.build/reference/be/functions#select.
```
PiperOrigin-RevId: 553184373
These are more type safe, and more clearly distinguish between a
raw message and serialized data.
This also defines a macro to create new opaque pointer types, and
switches `RawArena` to using it.
PiperOrigin-RevId: 552957136
This CL sets up the basic plumbing end-to-end for singular message fields.
We add skeletonized support for `Proxied` messages. This is done
by creating structs for $Msg$View and $Msg$Mut, and providing
stubbed impls.
PiperOrigin-RevId: 552609955
Fixes a class of flaky test failures observed only in the FFI implementation due to garbage collection in between calls to an accessors for a frozen field.
Closes#13420
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/13420 from protocolbuffers:rub 0ea91165fb
PiperOrigin-RevId: 552602026
This will make the text format parser reject inputs that have a nesting depth
greater than 150. We will soon lower this number down to 100 for consistency
with other implementations.
For use cases that rely on parsing deeply nested text protos, it is possible to
create a Parser with a custom recursion limit like this:
`TextFormat.Parser.newBuilder().setRecursionLimit(i).build()`.
PiperOrigin-RevId: 552543574
`ConsumeFieldValue()` has some special logic for handling Any fields, but this
does not seem to be necessary since `mergeField` can handle Any fields on its
own. This CL therefore deletes the Any-related logic from
`ConsumeFieldValue()`.
PiperOrigin-RevId: 552540364