This is in preparation for moving upb into the protobuf repo. Upb requires C++
17. Protobuf supports C++ 14, and our non-upb CI tests will keep using C++ 14
to ensure that it still works. Our Bazel CI runs use the bazelrc files in the
ci/ directory, so these runs should be unaffected by this change.
PiperOrigin-RevId: 555223181
Only emit has_field() if the field support presence. Only emit field_opt() getter if the field is both optional and supports presence.
PiperOrigin-RevId: 555133374
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
When build a FileDescriptorProto into pool, FieldDescriptorProto.type may not set if type_name is set. Runtime Change. To make copybara happy, tests will be added in a separate change
PiperOrigin-RevId: 553881407
The file structure was broken only when invoking from protobuf repo (`bazel build @upb//python/dist:source_tarball`) since filegroup files have a path like `protobuf/external/upb/python/dist/setup.py` rather than `protobuf/setup.py`
This was broken by 79af13abde
PiperOrigin-RevId: 553821217
Clang and GCC differ on how they detect Address Sanitizer. Support both.
Closes#1424
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/upb/pull/1424 from protocolbuffers:asan-clang 491a5ee4cfd24c8eb281f894de0cf4384525c46a
PiperOrigin-RevId: 553805994
When build a FileDescriptorProto into pool, FieldDescriptorProto.type may not set if type_name is set. Runtime Change. To make copybara happy, tests will be added in a separate change
PiperOrigin-RevId: 553598520
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