Protobuf Team Bot
a2cdf59778
Adding Edition 2023 z_generated_example.
...
PiperOrigin-RevId: 604754130
10 months ago
Alyssa Haroldsen
a522a47120
Validate that map keys are copied
...
PiperOrigin-RevId: 604716574
10 months ago
Alyssa Haroldsen
398508287e
Correct ExactSizeIterator impl for RepeatedIter
...
- size_hint must be implemented as described in the docs
- len/size_hint must return the number of items remaining in the iterator, not the size of the container
PiperOrigin-RevId: 604704172
10 months ago
Alyssa Haroldsen
3ccccdb855
Copy repeated string/bytes in upb when pushing/setting/copying
...
This memory management should be handled by Rust.
I've confirmed this works by running the new included tests with msan.
The sanitizer is necessary to detect an incorrect copy_from impl
that uses-after-free from the upb arena.
PiperOrigin-RevId: 604689154
10 months ago
Adam Cozzette
e8535e70da
Internal change
...
PiperOrigin-RevId: 604672870
10 months ago
Alyssa Haroldsen
01312f9c34
Add RepeatedIter to public protobuf items
...
PiperOrigin-RevId: 604554509
10 months ago
Alyssa Haroldsen
a9bcb60dc5
Remove RepeatedIterMut
...
Mutator access in repeated and map is a 1.0 feature.
PiperOrigin-RevId: 604554490
10 months ago
Éamonn McManus
3c2fa8f21c
Internal change.
...
PiperOrigin-RevId: 604537991
10 months ago
Mariano Simone
11eab86cc0
[Ruby] Delegate difference, intersection, union from RepeatedField to Array ( #15652 )
...
Coming from [[protobuf/issues/15180] [Ruby] Support for currently ignored Array methods in `RepeatedField`](https://github.com/protocolbuffers/protobuf/issues/15180 )
This adds a couple of `Array` methods to what gets delegated from `RepeatedField`.
- `intersection`, because `|` was already delegated
- `union`, because `&` was already delegated
- `difference`, because `-` was already delegated
Closes #15652
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/15652 from marianosimone:delegate_rb_array_methods 2971981338
PiperOrigin-RevId: 604534655
10 months ago
Jiri Pechanec
c98bdc2bdc
Add missing generated file ( #15693 )
...
The proto file is required for Java test. Otherwise it fails with
```
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.1:testCompile (default-testCompile) on project protobuf-java: Compilation failure: Compilation failure:
[ERROR] /tmp/protocolbuffers-protobuf-3.25.2/java/core/src/test/java/com/google/protobuf/DescriptorsTest.java:[46,25] cannot find symbol
[ERROR] symbol: class UnittestRetention
[ERROR] location: package protobuf_unittest
[ERROR] /tmp/protocolbuffers-protobuf-3.25.2/java/core/src/test/java/com/google/protobuf/DescriptorsTest.java:[550,27] cannot find symbol
[ERROR] symbol: variable UnittestRetention
[ERROR] location: class com.google.protobuf.DescriptorsTest
[ERROR] /tmp/protocolbuffers-protobuf-3.25.2/java/core/src/test/java/com/google/protobuf/DescriptorsTest.java:[551,37] cannot find symbol
[ERROR] symbol: variable UnittestRetention
[ERROR] location: class com.google.protobuf.DescriptorsTest
[ERROR] /tmp/protocolbuffers-protobuf-3.25.2/java/core/src/test/java/com/google/protobuf/DescriptorsTest.java:[552,37] cannot find symbol
[ERROR] symbol: variable UnittestRetention
[ERROR] location: class com.google.protobuf.DescriptorsTest
[ERROR] /tmp/protocolbuffers-protobuf-3.25.2/java/core/src/test/java/com/google/protobuf/DescriptorsTest.java:[553,37] cannot find symbol
[ERROR] symbol: variable UnittestRetention
[ERROR] location: class com.google.protobuf.DescriptorsTest
[ERROR] -> [Help 1]
```
Closes #15693
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/15693 from jpechane:add-missing-file 9293fabf1f
PiperOrigin-RevId: 604518500
10 months ago
Luke Sandberg
5d4fd7ef84
Clarify docs on MapFieldReflectionAccessorInternal and add tests for the mutability of lists returned from `getAllFields()`
...
PiperOrigin-RevId: 604508075
10 months ago
Alyssa Haroldsen
d445953603
Add map key and value iterators
...
PiperOrigin-RevId: 604495084
10 months ago
Protobuf Team Bot
f5a225597b
Minor cleanup: IWYU, shoud_split() instead of ShouldSplit(...).
...
PiperOrigin-RevId: 604471605
10 months ago
Protobuf Team Bot
41732e8fee
Auto-generate files after cl/604457261
10 months ago
Bernard Normier
3121f8ce10
Add IceRPC to the list of third-party RPC implementations ( #15072 )
...
This PR adds IceRPC for C# to the list of RPC implementations in third_party.doc.
IceRPC provides full support for Protobuf. See https://docs.icerpc.dev/protobuf for details.
Closes #15072
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/15072 from bernardnormier:add-icerpc 857e34e8ce
PiperOrigin-RevId: 604459237
10 months ago
Chris Kennelly
34a04c1fd5
Remove lazy=true from repeated fields.
...
This is currently a no-op in protoc.
PiperOrigin-RevId: 604457261
10 months ago
Alyssa Haroldsen
035d6ec2cb
Implement map iteration
...
PiperOrigin-RevId: 604447996
10 months ago
Chris Kennelly
37826c1da6
Only consider scalar submessages eligible for explicit lazy.
...
While other fields can be tagged "lazy", they do not impact codegen.
PiperOrigin-RevId: 604443879
10 months ago
Protobuf Team Bot
9e57b8e0d8
Add prefetching in arena blocks.
...
PiperOrigin-RevId: 604441990
10 months ago
Hong Shin
dbf7adfabc
protobuf: Replace NULL with nullptr in terra cpp
...
PiperOrigin-RevId: 604429747
10 months ago
Alyssa Haroldsen
3657e05292
Improve field publicity for repeated/maps
...
A public "raw" field in a safe wrapper is guaranteed unsound!
This makes repeated and map inner access consistent and
avoids exposing raw internals.
It also provides the accessors necessary for implementing map
access for external types.
PiperOrigin-RevId: 604405543
10 months ago
Adam Cozzette
3995f538ed
Fix crash found by fuzzer in descriptor.cc
...
PiperOrigin-RevId: 604391963
10 months ago
Protobuf Team Bot
bdd833f8fc
Fix issue where nested messages in non-primary .proto files couldn't be used.
...
PiperOrigin-RevId: 604383247
10 months ago
Protobuf Team Bot
2699579875
Breaking change: Remove the deprecated always_print_primitive_fields option from Java, Python and C++ JSON parsers.
...
The replacement always_print_without_presence_fields should be used instead, which is very similar but has consistent handling of optional fields by not affecting them.
PiperOrigin-RevId: 604381178
10 months ago
Alyssa Haroldsen
4c61b4364a
Consolidate PhantomData in maps
...
PiperOrigin-RevId: 604373597
10 months ago
Protobuf Team Bot
1b3dc52634
Automated rollback of commit 690f100a66
.
...
PiperOrigin-RevId: 604369183
10 months ago
Protobuf Team Bot
986d691d77
use "proto3_optional" option as signal that a field has presence.
...
This is technically redundant with the synthetic oneof container, but simplifies some tooling.
PiperOrigin-RevId: 604368850
10 months ago
Protobuf Team Bot
4d23fa068a
Move the RubyMessage.java JSON "include defaults" to use alwaysPrintFieldsWithNoPresence.
...
This is no different on proto3 but treats proto2-optional differently (to make it consistent with proto3-optional).
PiperOrigin-RevId: 604354927
10 months ago
Protobuf Team Bot
17bed48dd1
Remove the leftover fake message objects used to call ParseGroup.
...
All of those now call with a lambda instead.
PiperOrigin-RevId: 604346823
10 months ago
Protobuf Team Bot
96f3eeb91a
Add validation for string_type and ctype under edition 2024 and over.
...
PiperOrigin-RevId: 604345202
10 months ago
Jakob Buchgraber
929f19d3cc
#protobuf #rust publicly export ParseError
...
It's returned by Msg::deserialize() -> Result<(), ParseError> and should be publicly nameable as protobuf::ParseError.
PiperOrigin-RevId: 604326858
10 months ago
Chris Kennelly
cd47034a68
Prohibit lazy map fields.
...
They are a no-op in protoc.
PiperOrigin-RevId: 604324139
10 months ago
Protobuf Team Bot
077fba6124
Auto-generate files after cl/604314590
10 months ago
Protobuf Team Bot
16716bfb0d
Internal change
...
PiperOrigin-RevId: 604314590
10 months ago
Protobuf Team Bot
7d43131a0a
Rename the 'includingDefaultValueWithoutPresenceFields' and 'always_print_without_presence_fields' to 'alwaysPrintFieldsWithNoPresence' in the Cpp, Py and Java JSON serializers for consistency.
...
PiperOrigin-RevId: 604292220
10 months ago
Protobuf Team Bot
4cbe13b5c6
Remove the overlay hack from Rust conformance test now that we can use the enum directly.
...
PiperOrigin-RevId: 604226236
10 months ago
Saša Stamenković
d67f921f90
Don't break the trace ( #11311 )
...
Closes #11311
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/11311 from umpirsky:patch-1 d280be57b7
PiperOrigin-RevId: 603963886
10 months ago
Sandy Zhang
2faa9d1a5f
Force descriptor initialization of dependencies *before* internalUpdateFileDescriptor().
...
This fixes an edge-case where EnumDescriptor for a custom option may be unresolved if used in the same file, since adding the field to ExtensionRegistry doesn't trigger its static init block if the Enum is imported from a dependency.
Also renames feature resolution methods exposed from gencode. Private resolveAllFeaturesInternal() method may be renamed back to resolveAllFeatures() in a followup change.
PiperOrigin-RevId: 603852391
10 months ago
Sandy Zhang
9252b64ef3
Automated rollback of commit 0ee34d35de
.
...
PiperOrigin-RevId: 603802046
10 months ago
Joshua Haberman
60b80c6976
Breaking Change: Remove deprecated legacy class aliases.
...
Fixes: https://github.com/protocolbuffers/protobuf/issues/9593
Fixes: https://github.com/protocolbuffers/protobuf/issues/15696
PiperOrigin-RevId: 603777295
10 months ago
Mike Kruskal
54931ca45e
Disable test that seems to be using pre-Java 8
...
PiperOrigin-RevId: 603746010
10 months ago
Protobuf Team Bot
3924ea28cc
Automated rollback of commit 531d4372f4
.
...
PiperOrigin-RevId: 603728275
10 months ago
Protobuf Team Bot
461b50b180
Stop using including_default_value_fields as a positional argument in json_format_test.py
...
PiperOrigin-RevId: 603713528
10 months ago
lowasser
0ee34d35de
Simplify (and optimize) Descriptors.FileDescriptor.latin1Cat.
...
PiperOrigin-RevId: 603529248
10 months ago
Protobuf Team Bot
2a28082df3
Add "string_type" to CppFeatures.
...
PiperOrigin-RevId: 603514708
10 months ago
Masaaki Goshima
8b46b56467
Add gRPC Federation extension ( #15644 )
...
Adds an extension id to the registry for using gRPC Federation.
gRPC Federation's Repository: https://github.com/mercari/grpc-federation
Buf Schema: https://buf.build/mercari/grpc-federation
Buf Plugin: https://buf.build/community/mercari-grpc-federation
Closes #15644
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/15644 from goccy:main 52ffd58f05
PiperOrigin-RevId: 603514213
10 months ago
Protobuf Team Bot
202b106392
Remove tags for arena cleanup nodes now that we have dedicated string cleanup blocks.
...
PiperOrigin-RevId: 603491012
10 months ago
Protobuf Team Bot
0a8409b5f4
Turn on TDP table generation for messages with weak=true fields.
...
We still use the reflection based parser for it, but we have an otherwise
normal table generated.
PiperOrigin-RevId: 603481451
10 months ago
Alyssa Haroldsen
a48090e329
Make map insert return if the value was newly inserted
...
PiperOrigin-RevId: 603481207
10 months ago
Protobuf Team Bot
d111589bc0
Add a new 'includingDefaultValueWithoutPresenceFields' option to the Java parser which is intended to replace the current 'includingDefaultValueFields'.
...
The old flag accidentally had inconsistent behavior between proto2 optional and proto3 optional fields, the new flag treats them consistently (and is consistent with the preexisting behavior of the Go JSON serializer).
includingDefaultValueFields is now deprecated and will be removed in an upcoming release.
PiperOrigin-RevId: 603449195
10 months ago