Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from protocolbuffers:main #227

Open
wants to merge 8,539 commits into
base: main
Choose a base branch
from
Open

Conversation

pull[bot]
Copy link

@pull pull bot commented Apr 28, 2023

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

@pull pull bot added the ⤵️ pull label Apr 28, 2023
anandolee and others added 29 commits January 7, 2025 21:33
…xtensions in Py-upb and Php-upb and ruby-upb.

PiperOrigin-RevId: 713147042
There is a subtle behavior difference here when AllowUnknownDependencies is set on the pool, since unknown feature values are theoretically possible there.

PiperOrigin-RevId: 713301571
Before this fix, the overload resolution rules would accidentally attempt to call the accessor named clear() instead of the fn that would actually clear the message (Rust automatically prefers an inherent impl fn over a trait impl fn if both exist with the same name).

PiperOrigin-RevId: 713309633
#test-continuous

PiperOrigin-RevId: 713376224
PiperOrigin-RevId: 713388656
PiperOrigin-RevId: 713447476
The API of upb_alloc_func implies this would already be the case, and this is useful for calling `free_sized` in the future, which can be faster for some allocators as it allows skipping a bucket lookup.

PiperOrigin-RevId: 713536794
Protobuf 6.30.0 will change the return types of Descriptor::name() and other
methods to absl::string_view. This makes the code work both before and after
such a change.

PiperOrigin-RevId: 713643887
Previously running `gem install google-protobuf --platform ruby` used the default C compiler specified by `mkmf`, which uses `RbConfig::MAKEFILE_CONFIG["CC"]` and `RbConfig::MAKEFILE_CONFIG["CXX"]`.

This commit supports using `CC`, `CXX`, and `LD` from the environment:

```shell
export CC=my-custom-gcc
export CXX=my-custom-g++
gem install google-protobuf --platform ruby
```

Most native gems, such as grpc and nokogiri, allow for this.

Closes #19863

COPYBARA_INTEGRATE_REVIEW=#19863 from stanhu:sh-support-custom-gcc 33693f8
PiperOrigin-RevId: 713675592
Nullable annotations were added in the previous change.
We will add annotations to the runtime separately.
Once the absl macros from abseil/abseil-cpp@cd9dd42 becomes stable, we can switch to those
Not yet active in open source (more of a comment).

PiperOrigin-RevId: 713678926
Right now we generally hit warnings only in cases where someone used non-style-conformant names in their .proto, but warnings on rs codegen aren't the greatest way to surface those and it results in a lot of spam on our tests that intentionally violate the style guide.

PiperOrigin-RevId: 713742680
This reduces binary size and improves performance.
Most validation functions are cheaper than the cost of the function call
itself.

PiperOrigin-RevId: 713758496
…erhead on top of it.

PiperOrigin-RevId: 713766718
The java generator currently uses the enum-typed getters in mergeFrom for explicit presence fields, even for open enums.  This results in buggy behavior where unknown enum values can trigger runtime exceptions during merges.  It is reproducible in proto3 by using the `optional` keyword, but is more noticeable in edition 2023 due to the feature defaults.

PiperOrigin-RevId: 713780284
PiperOrigin-RevId: 713840242
PiperOrigin-RevId: 713870442
PiperOrigin-RevId: 714056391
…block to be provided and managed separately. This can avoid small mallocs when the approximate arena size is known.

PiperOrigin-RevId: 714075005
zhangskz and others added 30 commits February 10, 2025 09:43
…p and com_google_googletest -> @googletest canonical BCR names.

Users still using the old `WORKSPACE` system may need to do the same or use `repo_mapping` on repositories that still use the old names. See Abseil's release notes for details: https://github.com/abseil/abseil-cpp/releases/tag/20250127.

#test-continuous

PiperOrigin-RevId: 725247849
PiperOrigin-RevId: 725254907
This fixes the issue the recent conformance test call out as there
is a desire to handle this.

PiperOrigin-RevId: 725623031
PiperOrigin-RevId: 725672848
Exercise more code paths in `RepeatedPtrField::MergeFrom()` by calling it for more element types and from more possible object states, as well as with  arenas. This is to better unit test `MergeFrom()` with the new contiguous layout.

PiperOrigin-RevId: 725674252
PiperOrigin-RevId: 725760779
This reduces ~10.6% memory usage of descriptors in some benchmarks.

PiperOrigin-RevId: 725780778
The php extension already had an implementation for encoding enums as integers, but it was not exposed, so add a bitmask param to `Message::serializeToJsonString()` to enable it as well as `preserve_proto_field_names`.

Converted the existing boolean parameter to preferentially be an integer (with boolean handling for BC), which accepts a bitmask of `Google\Protobuf\PrintOptions::*`, eg `PrintOptions::ALWAYS_PRINT_ENUMS_AS_INTS | PrintOptions::PRESERVE_PROTO_FIELD_NAMES`

`PrintOptions` class name and constant names were chosen to align with protobuf-cpp's implementation.

Implemented `preserve_proto_fieldnames` in the native version, to match the existing implementation in the extension (with tests).

Closes #12707

COPYBARA_INTEGRATE_REVIEW=#12707 from brettmc:php-json-enum-as-int 515a083
PiperOrigin-RevId: 725806573
It is a member of the base class now.

Removes redundant code and reduces the size of the offsets table.

PiperOrigin-RevId: 726032588
PiperOrigin-RevId: 726034471
Instead of solely emitting a forwarding header that just houses incomplete types, we opt to forward declare as-needed inside our genn'ed hpb header.

PiperOrigin-RevId: 726050002
When a field is encoded normally in a MessageSet, only promote
it if it is a known extension, if it is an unknown extension, then leave
it as an unknown field.

PiperOrigin-RevId: 726062078
It's possible to receive an empty string from wire encoded as a zero-length
field. Add a unit test case to ensure that this edge case is handled properly.

PiperOrigin-RevId: 726154169
This makes these loop indices consistent with the vector indices that they are used to index, and removes some ClangTidy warnings about narrowing conversion.

PiperOrigin-RevId: 726233129
SetExtension had 6 overloads and was hard to update. We now consolidate to one function, and utilize our UpbTraitExtension machinery.

PiperOrigin-RevId: 726489249
PiperOrigin-RevId: 726534130
This is a no-op change, but would prepare us to add the int table as an alternative data structure for primitive map keys.

PiperOrigin-RevId: 726536300
PiperOrigin-RevId: 726558800
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.