Eric Salo
5d136e1b4d
upb: add containing_type() methods to MessageDefPtr and EnumDefPtr
...
PiperOrigin-RevId: 616908935
11 months ago
Mike Kruskal
bca8fb6117
Implement edition 2023 support in all Ruby runtimes.
...
Three of these runtimes are based on upb, and the fourth is based on the Java runtime. Both of these already have editions support, so this was mostly just a matter of:
- Advertising support to allow editions codegen
- Stripping features from the runtime options
- Hooking up conformance tests
- Adding some lightweight editions tests
There are also a few minor orthogonal fixes included here:
- Ruby's upb hack for treating all enums as open enums needed tweaking
- The `enable_editions` flag is no longer needed in our internal proto rules
PiperOrigin-RevId: 616256211
11 months ago
Protobuf Team Bot
2f0fe0641c
Add Arena tracing handlers.
...
PiperOrigin-RevId: 615779322
11 months ago
Eric Salo
a03ece58f7
upb: delete upb_Map_Delete2()
...
PiperOrigin-RevId: 615169203
11 months ago
Mike Kruskal
b6032d72e3
Add basic upb cmake support.
...
libupb will always be statically linked, and currently doesn't ever install itself.
PiperOrigin-RevId: 615136389
11 months ago
Eric Salo
e1a19ba8bb
upb: add 'options' arg to upb_Message_IsEqual()
...
PiperOrigin-RevId: 614707625
11 months ago
Mike Kruskal
04397d4c77
Exclude checked-in descriptor gencode from source wheels.
...
PiperOrigin-RevId: 614038432
12 months ago
Protobuf Team Bot
45f9158b8a
Auto-generate files after cl/613970553
12 months ago
Protobuf Team Bot
e41ffb01a2
Auto-generate files after cl/613765356
12 months ago
Éamonn McManus
3c0f3ca6be
Document `upb_Message_SetMessage`.
...
PiperOrigin-RevId: 613747349
12 months ago
Protobuf Team Bot
99315b19d2
Fix upb_MiniTable_SetFullName signature.
...
PiperOrigin-RevId: 613716602
12 months ago
Protobuf Team Bot
cbfb6991f3
Add api to trace message allocations.
...
Initialize minitable tracing field for MtDecoder
Add api for non C language runtimes to initialize dynamic mini table name.
PiperOrigin-RevId: 613664457
12 months ago
Mike Kruskal
d5543304d5
Fix has_presence to account for proto3 extensions in Python.
...
PiperOrigin-RevId: 613361074
12 months ago
Protobuf Team Bot
5d58cb8559
Auto-generate files after cl/613290255
12 months ago
Protobuf Team Bot
f2242d7136
Add proto full name support for tracing.
...
Creates a tracing helper function to associate mini tables with proto full names to use for upcoming upb metrics collectors.
PiperOrigin-RevId: 613290255
12 months ago
Eric Salo
3d7e75fb98
upb: remove split64 from Dart VM, delete array_split64.h from upb/message/
...
PiperOrigin-RevId: 613285612
12 months ago
Éamonn McManus
6cbcff4bb6
Clarify that `upb_Message_SetString` does not copy data.
...
PiperOrigin-RevId: 613258771
12 months ago
Protobuf Team Bot
e8244da7c6
Adds mutable extension accessors to the codegen for upb C for getting mutable extension messages.
...
PiperOrigin-RevId: 613017999
12 months ago
Éamonn McManus
507f037f7e
Document the return value of `upb_Message_SetField`.
...
PiperOrigin-RevId: 612961189
12 months ago
Eric Salo
4502dd1ea3
upb: fix upb_MiniTableField_IsInOneof() to be UPB_API_INLINE everywhere
...
PiperOrigin-RevId: 611488947
12 months ago
Jean byroot Boussier
87cbdddbf0
Ruby implement memsize functions for native types ( #10291 )
...
Fix: https://github.com/protocolbuffers/protobuf/issues/10280
This allows Ruby to report a more correct estimation of the memory used by these objects.
It's useful when running memory profilers against applications.
cc @zhangskz @haberman
Closes #10291
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/10291 from casperisfine:ruby-sizes 9150795328
PiperOrigin-RevId: 606718632
1 year ago
Protobuf Team Bot
52f9ea88d8
No longer allow minidescriptors to accept message fields tagged as proto3 scalar (implicit presence)
...
PiperOrigin-RevId: 606340283
1 year ago
Eric Salo
a5d9b0522c
upb: delete upb_Message_IsExactlyEqual()
...
PiperOrigin-RevId: 606282881
1 year ago
Eric Salo
b5957f108a
upb: implement _upb_Arena_Contains()
...
PiperOrigin-RevId: 606262924
1 year ago
Eric Salo
c69ed472cd
upb: implement minitable-based field iterators
...
PiperOrigin-RevId: 605718863
1 year ago
Eric Salo
b0d3a787cc
upb: Simplify inline functions in mini_table/ and mem/ and wire/ and message/
...
PiperOrigin-RevId: 605413999
1 year ago
Éamonn McManus
3c2fa8f21c
Internal change.
...
PiperOrigin-RevId: 604537991
1 year ago
Eric Salo
bc75a9be30
upb: remove the default arg from upb_Message_GetMessage()
...
PiperOrigin-RevId: 603225526
1 year ago
Mike Kruskal
9a020c4a7b
Unify behavior of deprecated_legacy_json_field_conflicts across upb and syntax.
...
This disables all checks of json_name for upb and protoc under both proto2 and proto3. This option is deprecated that will be removed in future versions, and is only meant as a temporary solution. This also fixes a latent bug in the calculation of camelcase name in Python/upb.
Fixes #12525
PiperOrigin-RevId: 603158026
1 year ago
Joshua Haberman
32a6f7a18c
Increased the size of the error message buffer by 4x, to 511 bytes.
...
The previous limit of 127 was causing error messages to get truncated when long identifiers are in use.
This will increase the stack usage of any code that is allocating a `upb_Status` on the stack. If we want to support smaller stacks in the future, we could change `upb_Status` to store its capacity inline, so different users can allocate error buffers with different capacity.
Fixes: https://github.com/protocolbuffers/protobuf/issues/14376
PiperOrigin-RevId: 603136385
1 year ago
Eric Salo
f212cc23d7
upb: use upb_MessageValue in upb_Extension
...
PiperOrigin-RevId: 602785269
1 year ago
Eric Salo
7303758dd2
upb: factor out Java code for reading upb_Array data
...
PiperOrigin-RevId: 602461889
1 year ago
Eric Salo
98843d15ac
upb: attempt to reduce the direct use of UPB_PRIVATE() fields
...
PiperOrigin-RevId: 602270576
1 year ago
Éamonn McManus
5f81741473
Small fix for accessing upb from Kotlin/Native.
...
Tell cinterop that the `const char*` parameter in `upb_StringView_FromDataAndSize` is not actually a string.
PiperOrigin-RevId: 602026274
1 year ago
Eric Salo
7b6a845ab7
upb: implement immutability
...
PiperOrigin-RevId: 601848001
1 year ago
Éamonn McManus
b809398add
Small fixes for accessing upb from Kotlin/Native.
...
* Tell cinterop that the `const char*` parameter in `upb_Decode` is not actually a string.
* Add `kotlin_native_hint` to `upb/wire`.
PiperOrigin-RevId: 601795518
1 year ago
Eric Salo
5bded04d28
upb: add 'static' to UPB_FORCEINLINE()
...
PiperOrigin-RevId: 601525709
1 year ago
Eric Salo
953d521a04
upb: upb_Message_FindExtensionByNumber() no longer returns a (upb_Extension*)
...
PiperOrigin-RevId: 601494260
1 year ago
Joshua Haberman
ca5ca62fa6
Fixed a bug when deep copying a map field with a closed enum value.
...
PiperOrigin-RevId: 601195914
1 year ago
Eric Salo
9d625a1df7
upb: fix the map encoder to stop dying under ubsan
...
PiperOrigin-RevId: 601004095
1 year ago
Eric Salo
ed5eb924d7
upb: upb_Message_ExtensionByIndex() no longer returns a (upb_Extension*)
...
PiperOrigin-RevId: 600926618
1 year ago
Eric Salo
f9af78e7ee
upb: upb_MiniTable_GetOrPromoteExtension() no longer returns a (upb_Extension*)
...
PiperOrigin-RevId: 600662130
1 year ago
Eric Salo
07f784a2f3
upb: tag _upb_Message_GetOrCreateExtension() as UPB_PRIVATE()
...
PiperOrigin-RevId: 600653849
1 year ago
Eric Salo
373ffa6622
upb: tag _upb_Message_Getext() as UPB_PRIVATE()
...
PiperOrigin-RevId: 600639423
1 year ago
Éamonn McManus
fc2d9da9c0
Wrap C++ headers in `#ifdef __cplusplus`.
...
The upb libraries can also be accessed from Kotlin Native code, which
understands only C headers, not C++. By adding these `#ifdef` directives, the
C++ headers will appear to be empty in that case.
PiperOrigin-RevId: 599593286
1 year ago
Eric Salo
7c5ff29979
upb: add upb_MiniTableExtension_CType()
...
PiperOrigin-RevId: 599313198
1 year ago
Eric Salo
72275ded70
upb: move upb_Message definition back into upb/message/
...
PiperOrigin-RevId: 598741329
1 year ago
Protobuf Team Bot
9ce56e363c
Auto-generate files after cl/597923328
1 year ago
Eric Salo
8d0bfb0a5a
upb: delete upb:upb, upb:collections, upb/upb.hpp, upb/collections/
...
PiperOrigin-RevId: 597923328
1 year ago
Joshua Haberman
f2a91b33e1
Make `str(msg)` in Python print raw UTF-8 strings. Only invalid UTF-8 is escaped.
...
PiperOrigin-RevId: 597917280
1 year ago