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
Protobuf Team Bot
3a007b59ae
Internal versioning changes
...
PiperOrigin-RevId: 597906574
11 months ago
Protobuf Team Bot
6c4ea1fadb
Internal changes.
...
PiperOrigin-RevId: 597873923
11 months ago
Protobuf Team Bot
3b9bd6db71
Breaking Change: Remove unused overload of AbstractMessageLite.addAll that worked on a Collection instead of a List.
...
PiperOrigin-RevId: 597869849
11 months ago
Protobuf Team Bot
2f5305d7fe
Auto-generate files after cl/597850176
11 months ago
Marcel Hlopko
6860c38119
Read crate mapping in protoc
...
This enables us to get the correct crate names for Rust gencode.
PiperOrigin-RevId: 597850176
11 months ago
Protobuf Team Bot
9310d2e817
Breaking Change: Remove obsolete runtime internalBuildGeneratedFileFrom which was for backwards compatibility with old gencode.
...
Remove `sentinel.proto` and references to it.
This was announced in https://protobuf.dev/news/2023-12-05/ per our Cross-Version Runtime Guarantees: https://protobuf.dev/support/cross-version-runtime-guarantee/
PiperOrigin-RevId: 597849821
11 months ago
Protobuf Team Bot
e542443b53
Move the FieldInfoComment down into AccessorGenerator.
...
PiperOrigin-RevId: 597835662
11 months ago
Sandy Zhang
519284a559
Remove LegacyDescriptorsUtil.java and JRuby's use of legacy descriptor APIs
...
This is not a breaking change since this has not been released yet.
PiperOrigin-RevId: 597824548
11 months ago
Jakob Buchgraber
8d9e3e9a1c
#rust #protobuf Refactor maps to make ProxiedInMapValue independent of the runtime
...
- ProxiedInMapValue is defined in maps.rs, and no longer in the runtime files {upb, cpp}.rs.
- ProxiedInMapValue's methods accept and return Proxied types.
- InnerMapMut no longer has any generic type parameters.
- Through this refactoring the Map type is no longer a ZST. Creating a new map is now as simple as `Map::new()`.
PiperOrigin-RevId: 597765165
11 months ago
Marcel Hlopko
baaaca87b3
Split off file from //src/google/protobuf/testing
...
This change is needed to enable making Rust plugin depend on the file.h in non-testing code.
PiperOrigin-RevId: 597762822
11 months ago
Protobuf Team Bot
94a2a44851
Breaking Change: remove unnecessary overloads of methods:
...
hasExtension
getExtensionCount
getExtension
PiperOrigin-RevId: 597702196
11 months ago
Protobuf Team Bot
cdcd166f2b
Minor cleanup: IWYU, etc.
...
PiperOrigin-RevId: 597698437
11 months ago
Joshua Haberman
d14dbbc838
Breaking Change: Validate UTF-8 in string setters, [as previously announced]( https://protobuf.dev/news/2023-12-27/#php-breaking-changes ).
...
Pure-PHP was already validating UTF-8, but this makes the C extension validate also.
PiperOrigin-RevId: 597695655
11 months ago
Protobuf Team Bot
d1444e2282
Auto-generate files after cl/597686725
11 months ago
Mike Kruskal
93b219f4e8
Remove edition getter from C++ descriptor APIs
...
PiperOrigin-RevId: 597686725
11 months ago
Eric Salo
e6d8669958
upb: fix gencode bug with Map<*, bytes>
...
PiperOrigin-RevId: 597678769
11 months ago
Protobuf Team Bot
7bff169d32
Breaking Change: Remove unnecessary generated overrides for GeneratedMessage.Builder methods:
...
setUnknownFields
mergeUnknownFields
clone
setField
clearField
clearOneof
setRepeatedField
addRepeatedField
setExtension
addExtension
clearExtension
PiperOrigin-RevId: 597677225
11 months ago
Protobuf Team Bot
03440ec744
Auto-generate files after cl/597662892
11 months ago
Eric Salo
5c5f092606
upb: implement upb_Message
...
PiperOrigin-RevId: 597662892
11 months ago
Sandy Zhang
81ce69985a
Update Java generated code to call new resolveAllFeatures() runtime method stub.
...
This method stub was already added in a previous change. A followup change will make runtime changes implementing and relying on this method.
PiperOrigin-RevId: 597650170
11 months ago