This leaves the decision of which C++ version to use up to our users. We still have a static_assert in port_def.inc that will prevent pre-C++14 usage.
PiperOrigin-RevId: 501351066
There are two issues here related to recent changes:
1) Our extern declarations of common RepeatedField types were removed, allowing RepeatedField::Reserve to get inlined. This results in an `array-bounds` warning from gcc due to our memcpy call. We had an explicit comment that this method shouldn't be inlined, and that silences the warning.
2) Using std::inserter with flat_hash_set::end() triggers a `maybe-uninitialized` warning from gcc. This is likely an Abseil issue, and showed up recently as part of our effort to migrate to the more efficient Abseil containers. Alternatively inserting into flat_hash_set::begin() works just fine and avoids this issue.
PiperOrigin-RevId: 501301957
I.e., if foo.extn is an extension for message foo.Foo, attempting to parse the document
{"[foo.extn]": 4}
as a foo.Bar would crash. This CL causes the parser to return an error instead.
PiperOrigin-RevId: 501299336
possible values form a contiguous range that starts with 0 or 1, and end no
greater than 126, when parsing a noncontiguous stream (such as from a Cord).
This routine was misusing `ParseContext::Done`. It should only be used at tag boundaries and not within field parsing.
PiperOrigin-RevId: 501107542
addresses #11243
Defines `$key_type` in `MapFieldIter`, so as not to trigger PHP 8.2 warning. Note that this will change the visibility of `$key_type` from public in previous versions to private in this version. This is a breaking change, but anyone using `$key_type` in this way is misusing the library, so I think it's acceptable.
Closes#11485
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/11485 from bshaffer:fix-php-82-dynamic-warning-in-MapFieldIter b45c34d2be
PiperOrigin-RevId: 501040413
`ZeroCopyCodedInputStream::ReadCord()` is implemented in terms of `CodedInputStream::ReadCord()` which is incorrect: the contract for the interface method `ZeroCopyInputStream::ReadCord()` is that it appends to the provided cord output where `CodedInputStream::ReadCord()` sets the cord output value, clearing any pre-existing contents. This change fixes the internal implementation to append to any pre-existing contents.
PiperOrigin-RevId: 500872467
Implemented in java, c++, python and upb. Also added conformance test.
https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Value
where it says:
attempting to serialize NaN or Infinity results in error. (We can't serialize these as string "NaN" or "Infinity" values like we do for regular fields, because they would parse as string_value, not number_value).
PiperOrigin-RevId: 500828964
This removes the built in "extern template" declarations because they continue to cause issues in shared library builds. Users who need this optimization can define it themselves. This also adds PROTOBUF_EXPORT to some symbols that were previously missing it.
PiperOrigin-RevId: 500223387
- Add UntypedMapBase as a base class for all Map instances. Move all type independent methods to the base class.
- Remove InnerMap and make Map itself provide the base classes.
Also, update some stale documentation.
PiperOrigin-RevId: 500208690
Implemented in java, c++, python and upb. Also added conformance test.
https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Value
where it says:
attempting to serialize NaN or Infinity results in error. (We can't serialize these as string "NaN" or "Infinity" values like we do for regular fields, because they would parse as string_value, not number_value).
PiperOrigin-RevId: 500139380
fixes https://github.com/protocolbuffers/protobuf/issues/11387
Addresses misc PHPDoc formatting issues.
Note: This does the bare minimum to suppress the errors. In some cases, most notably in `CodedInputStream`, the `@param` tag is still missing a typehint, and should have one added (in those cases, the variable is being passed in as `int`, but then used in the function as `string`, so it will take consideration)
Closes#11417
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/11417 from bshaffer:fix-php-lint 32c665d1e2
PiperOrigin-RevId: 499952558
This uses https://github.com/protocolbuffers/rules_ruby to fully Bazelify our ruby runtime code. The Rakefile is left in place for now and is still used by our aarch64 tests. With the current implementation ruby behaves similarly to our python wrapper, which selects whatever version is installed in the system. Future enhancements will allow for more hermetic builds via Bazel flags to pin a specific version
Closes#10525
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/10525 from mkruskal-google:rules_ruby 97fa1f70ab
PiperOrigin-RevId: 499283908
I updated our Bazel CI jobs to cover `//pkg/...` and thereby exercise this new
test. That made me realize that `//pkg/...` was not fully buildable because
there was a reference to the non-existent target `@utf8_range//:dist_files`, so
I also fixed that.
PiperOrigin-RevId: 498437497
We would like for upb_Map_Delete() to optionally return the deleted value.
Unfortunately this will require several steps since we are crossing repos.
Step #4: advance the upb version used by protobuf and update PHP/Ruby accordingly.
PiperOrigin-RevId: 498426185
using the "RotRight7" decoder. The "shldq" technique is much faster on recent
Intel and AMD CPUs, when processing larger integers, especially on Zen.
PiperOrigin-RevId: 498078103
qualified type name (ie starts with `.`).
This way we guarantee that the spelling the `.proto` file will be the same as
the spelling we see after crosslinking types.
Otherwise, the spellings might differ and it makes it harder to determine if
the name in the allowlist matches the name in the `.proto` file.
PiperOrigin-RevId: 497997383