Protobuf Team Bot
979c39178b
Format CodedInputStream & Test
...
PiperOrigin-RevId: 599528929
11 months ago
Protobuf Team Bot
2c28d728da
Add missing Protobuf Java version checks for enums and missing version info when separate Java files are generated.
...
PiperOrigin-RevId: 599515908
11 months ago
Protobuf Team Bot
3d79d0374b
Auto-generate files after cl/599369761
11 months ago
Protobuf Team Bot
fedd34df47
Allocate an editions FeatureSet extension for https://github.com/bufbuild/protobuf-es
...
PiperOrigin-RevId: 599369761
11 months ago
Alyssa Haroldsen
32c17c0919
Simplify format variables in singular_string
...
PiperOrigin-RevId: 599335169
11 months ago
Alyssa Haroldsen
c1bb1981a4
Remove Deref from MapMut
...
PiperOrigin-RevId: 599329208
11 months ago
Alyssa Haroldsen
b6ea6f9192
Remove Deref from RepeatedMut
...
PiperOrigin-RevId: 599328590
11 months ago
Protobuf Team Bot
2fb2274716
Auto-generate files after cl/599323122
11 months ago
Alyssa Haroldsen
4696ac71ca
Rename 'a to 'msg in message gencode
...
PiperOrigin-RevId: 599325506
11 months ago
Alyssa Haroldsen
ab8b762941
Use `self` for all methods on views, return `'msg`
...
View is Copy, and so it can preserve the lifetime of itself
when accessing any fields.
PiperOrigin-RevId: 599323122
11 months ago
Sandy Zhang
7c2e9c10d8
Add include for absl/str_cat.h
11 months ago
Protobuf Team Bot
fe6a601598
Auto-generate files after cl/599313198
11 months ago
Eric Salo
7c5ff29979
upb: add upb_MiniTableExtension_CType()
...
PiperOrigin-RevId: 599313198
11 months ago
Protobuf Team Bot
8eb7c63ee7
Correct conformance_cpp to use the requested message type for JSON tests.
...
Before this fix it incorrectly always used the Proto3 test message.
PiperOrigin-RevId: 599285917
11 months ago
Hong Shin
808487918c
Initialize scaffolding for ProxiedWithPresence for Messages
...
We want to return $pb$::FieldEntry<'_, $msg_type$> for msg_mut accessors as opposed to the current state (returning $Msg$Mut directly).
In this CL, we pave the way to implementing field entry returns.
We introduce { MessagePresentMutData, MessageAbsentMutData } and impl { ProxiedWithRawVTable, ProxiedWithRawOptionalVTable }. I initially tried a blanket impl approach, but it collided with the already existing PrimitiveVTable constructs; perhaps worth revisiting post 0.6.
In a followup, we'll flesh out the bodies. Lastly, we'll perform the swapover by
replacing $field$_mut with $field$_entry, updating all related tests.
PiperOrigin-RevId: 599282850
11 months ago
Alyssa Haroldsen
e16dd47999
Implement IntoIterator for &Repeated{View,Mut}
...
googletest matchers use this. Unfortunately, we still can't
use `elements_are!` with them:
https://github.com/google/googletest-rust/issues/351
PiperOrigin-RevId: 599281808
11 months ago
Alyssa Haroldsen
19851968bb
Fix indentation of a macro in simple_nested_test.rs
...
Looks like rustfmt doesn't do it automatically.
PiperOrigin-RevId: 599271261
11 months ago
Sandy Zhang
734e8e6adf
Update sha hash to match new absl commit
11 months ago
Sandy Zhang
c0ab33b520
Update to latest absl RC 20240116.rc1
11 months ago
Kevin King
9bd8dfa639
Add Repeated<Message> accessors
...
Shares logic with Repeated<Scalar> accessors.
PiperOrigin-RevId: 599263714
11 months ago
Protobuf Team Bot
b04a213326
Auto-generate files after cl/599244388
11 months ago
Kevin King
a19ce5b002
Move repeated_scalar.cc to repeated_field.cc
...
Repeated scalars and messages can share the same accessor code.
PiperOrigin-RevId: 599244388
11 months ago
Kevin King
df376c807c
Implement ProxiedInRepeated for Messages
...
PiperOrigin-RevId: 599241012
11 months ago
Protobuf Team Bot
27af4c802f
Auto-generate files after cl/599220883
11 months ago
Protobuf Team Bot
57a0ff8c92
Reserve and extension number in proto2.FeatureSet for Go
...
PiperOrigin-RevId: 599220883
11 months ago
Joshua Haberman
9188b39fb7
Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full.
...
PiperOrigin-RevId: 599218886
11 months ago
Kevin King
b3639a0e9a
Add rust bindings for `upb_Array_GetMutable`
...
PiperOrigin-RevId: 599208395
11 months ago
Protobuf Team Bot
4773c091d2
Also emit the oneof accessors into $Msg$Mut and $Msg$View
...
PiperOrigin-RevId: 599199864
11 months ago
Joshua Haberman
50d0421170
Separate MiniTable code generator into a separate library target.
...
This will allow it to be linked into other code generators.
PiperOrigin-RevId: 599171495
11 months ago
Protobuf Team Bot
12e6af88e9
Auto-generate files after cl/599153141
11 months ago
Protobuf Team Bot
cd575718be
Update the r# prefixing logic:
...
- Only prepend r# to fields when needed instead of always
- Append '__mangled_because_symbol_is_a_rust_raw_identifier' to names like 'Self' which can't be used legally even with an r# prefix
Also use the same check to prepend r# on:
- Message names (eg `message Self {}`)
- oneof names
- oneof case names
- enum names
- enum case names
- module names (e.g. 'package google.type')
PiperOrigin-RevId: 599153141
11 months ago
Jakob Buchgraber
85972e505a
#rust #protobuf Implement bytes as map values
...
We now support fields with bytes as map values e.g. map<i32, bytes>. The implementation for the C++ runtime was straightforward. The majority of the changes in this CL are about the UPB runtime. In UPB, when we insert Rust bytes/string into the map we need to first copy the bytes onto the maps arena. To support this I have rewritten the macro that implements the ProxiedInMapValue types. I refactored the functionality to convert between UPB and Rust types into the 'UpbTypeConversions' trait. This trait has a function 'to_message_value_if_required' which does the copying for bytes and strings.
PiperOrigin-RevId: 599118416
11 months ago
Protobuf Team Bot
1fe463ce71
Avoid integer-to-pointer cast in protobuf SerialArena
...
PiperOrigin-RevId: 598966004
11 months ago
Protobuf Team Bot
dfc275fc1f
Auto-generate files after cl/598899738
11 months ago
Protobuf Team Bot
d716c2e963
Reuse Message's accessor definitions on Msg+MsgMut+MsgView
...
PiperOrigin-RevId: 598899738
11 months ago
Protobuf Team Bot
55820f2b22
Remove redundant [[noinline]].
...
Function implementation is defined out of line - having a noinline wrapper is just a pessimization.
PiperOrigin-RevId: 598886387
11 months ago
Protobuf Team Bot
deb2dff4e1
Progress towards reusing the same accessor definitions on Msg+MsgMut+MsgView
...
This adds private methods of:
-- .raw_msg() to Msg+MsgMut+MsgView
-- .raw_arena() to Msg+MsgMut [upb kernel only]
And updates the accessors to use the self.raw_msg() / self.raw_arena().
A couple more things will need to be changed before the accessors can be verbatim reused in Msg/MsgView/MsgMut which will be mailed separately.
PiperOrigin-RevId: 598869392
11 months ago
Marcel Hlopko
e4ae0c110f
Make rust_crate_mapping flag optional
...
If the flag is not passed, it means the current proto_library has no deps.
PiperOrigin-RevId: 598846330
11 months ago
Marcel Hlopko
88d991d310
Depend on all deps of a proto_library, not just the first
...
The code this is fixing was not done properly. This CL fixes it.
PiperOrigin-RevId: 598832639
11 months ago
Protobuf Team Bot
c12c96e194
Auto-generate files after cl/598741329
11 months ago
Eric Salo
72275ded70
upb: move upb_Message definition back into upb/message/
...
PiperOrigin-RevId: 598741329
11 months ago
Protobuf Team Bot
854ca49520
Internal versioning changes.
...
PiperOrigin-RevId: 598625150
11 months ago
Kevin King
7b42f1c08b
Add `Msg::as_{view,mut}()`
...
PiperOrigin-RevId: 597969809
11 months ago
Protobuf Team Bot
a37522001f
Auto-generate files after cl/597962426
11 months ago
Protobuf Team Bot
bc7c90f2c2
Internal Protobuf changes
...
PiperOrigin-RevId: 597962426
11 months ago
Alyssa Haroldsen
0a4c006a39
Return RepeatedMut<c_int> for cpp cast_enum_repeated_mut
...
PiperOrigin-RevId: 597950980
11 months ago
Alyssa Haroldsen
e7a224cd85
Support enums as oneof fields
...
PiperOrigin-RevId: 597950541
11 months ago
Protobuf Team Bot
9ce56e363c
Auto-generate files after cl/597923328
11 months ago
Eric Salo
8d0bfb0a5a
upb: delete upb:upb, upb:collections, upb/upb.hpp, upb/collections/
...
PiperOrigin-RevId: 597923328
11 months ago
Joshua Haberman
f2a91b33e1
Make `str(msg)` in Python print raw UTF-8 strings. Only invalid UTF-8 is escaped.
...
PiperOrigin-RevId: 597917280
11 months ago