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
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 #2: Point PHP and Ruby at the new temporary function.
point the protobuf repo at latest upb
regenerate the amalgamation files
PiperOrigin-RevId: 497310441
It's quite common that fields in its proto description usually appear in the tag increasing order and thus let's use this assumption and do not call std::sort more than needed. Also calls to std::sort on smaller ranges as extension tags are almost always bigger and they are returned in their increasing order.
PiperOrigin-RevId: 497123665
These files get automatically updated as post-submit actions, and there's no reason to ever used the checked in versions. Daily run staleness test verify that those don't go out of date.
PiperOrigin-RevId: 496800868
It looks like Bazel 6.0 changed the stringification of Label objects:
b1113f801d
That is causing some problems for our staleness test, since different
Bazel versions get different results. This CL fixes the problem by
tweaking the logic so that we explicitly format the label string.
PiperOrigin-RevId: 496790722
This is not all of the logic, since there are places in message.cc that inadvisedly reach into field variables, and only primitive_field.cc is ported to the new system in this CL, as an example.
There are various unrelated-looking changes in this CL that are actually required to keep it a no-op, which are a product of the implicit dependencies between different parts of the backend.
PiperOrigin-RevId: 496770877
This CL:
* Does the aforementioned.
* Deletes all of the associated headers and moves the implementation class definitions into the .cc files.
* Exposes factory functions for all the different FieldGenerator implementations.
This change will be followed up by parallel changes that clean up individual .cc files to delete redundant code. This change reduces what files need to be updated in future FieldGenerator refactors, and places them in a central location for this. Finally, because these classes only exist to implement FieldGenerator, they should not expose any other API for other parts of the compiler to use.
PiperOrigin-RevId: 496722868
Prepare protobuf for bzlmod
Self-reference to `@com_google_protobuf` doesn't work with bzlmod.
In case this is a rule attribute, no reference is needed.
When the label is a default parameter value in a macro it needs to be wrapped with `Label` call, to relativise it correctly.
PiperOrigin-RevId: 496687786
Release notes from https://github.com/protocolbuffers/protobuf/releases should be the singular source of truth for release changelogs. Post-Copybara, this file is no longer needed to stage changes from syncs for the next release.
PiperOrigin-RevId: 496683510