Eric Salo
46699b72ad
move message set enums into upb/wire/ (and use them)
...
PiperOrigin-RevId: 486366363
2 years ago
Eric Salo
5f1ff7c94a
change mini_table accessors test from the C encoder to the C++ encoder
...
PiperOrigin-RevId: 486363897
2 years ago
Copybara-Service
50a01524dc
Merge pull request #901 from limdor:patch-3
...
PiperOrigin-RevId: 486361732
2 years ago
Xavier Bonaventura
7de6cf7a7d
Build with incompatible_disallow_empty_glob
...
In order to flip the flag, all downstream projects should be adapted.
However, it is hard to fix them all if there are constant regressions.
Adding it to the CI will ensure that once the project can build with
incompatible_disallow_empty_glob it can keep building like that.
See: https://github.com/bazelbuild/bazel/pull/15327
2 years ago
Eric Salo
fd040a8bff
create collections/map_internal.h and collections/map_gencode_util.h
...
Move the map-related functions from msg_internal.h that are only used in generated code into map_gencode_util.h. Then move the rest of the map-related functions from msg_internal.h into map_internal.h.
PiperOrigin-RevId: 486299140
2 years ago
Protobuf Team Bot
a4779ef5f8
internal change
...
PiperOrigin-RevId: 486275169
2 years ago
Protobuf Team Bot
f345caf115
Update diagnostics for GCC warning
...
PiperOrigin-RevId: 486274318
2 years ago
Jie Luo
73661563db
Added is_closed to EnumDescriptor in protobuf python upb
...
PiperOrigin-RevId: 486253678
2 years ago
Protobuf Team Bot
0f4fffef16
Update config_setting visibility in support of --incompatible_config_setting_private_default_visibility.
...
For https://github.com/bazelbuild/bazel/issues/12933 .
PiperOrigin-RevId: 486230747
2 years ago
Protobuf Team Bot
306123e2e8
C++ Code generator
...
PiperOrigin-RevId: 486158566
2 years ago
Eric Salo
fd14316f38
create collections/ subdir for all array and map code
...
PiperOrigin-RevId: 486013554
2 years ago
Joshua Haberman
115b878a5c
Optimization: do not generate oneofs for proto3 optional fields.
...
Proto3 optional fields should use a hasbit for their presence. But we had been giving them oneof layouts, which makes them unnecessarily large. This CL will shrink messages with proto3 optional fields, by using hasbits instead of oneof cases for them.
PiperOrigin-RevId: 485998527
2 years ago
Joshua Haberman
93fee65c55
Merge pull request #884 from acozzette/test-cmake-generation
...
Make trivial change to CMakeLists.txt to test auto-generation
2 years ago
Eric Salo
d9b6f13cde
remove upb_MtDataEncoder from the public surface
...
PiperOrigin-RevId: 485928803
2 years ago
Eric Salo
0bb466356d
create text/ subdir for all text-format code
...
Currently all we have is an encoder but eventually a decoder will also go here.
PiperOrigin-RevId: 485911424
2 years ago
Protobuf Team Bot
9b8785ebd3
Pin Upb to C++ 17
...
Update rules_fuzzing to v0.3.2
PiperOrigin-RevId: 485902979
2 years ago
Eric Salo
e137175092
create wire/ subdir for all wire-format code
...
PiperOrigin-RevId: 485898080
2 years ago
Eric Salo
f409c9985b
create mem/ subdir for all arena code
...
PiperOrigin-RevId: 485884460
2 years ago
Mike Kruskal
5ba0d84c88
Internal Change
...
PiperOrigin-RevId: 485726227
2 years ago
Adam Cozzette
496276471d
Make trivial change to CMakeLists.txt to test auto-generation
...
If the auto-generation is working correctly, then CMakeLists.txt should
be quickly auto-updated with a change that undoes this one.
2 years ago
Eric Salo
c033eff26f
split apart mini_table.c into a new subdir
...
PiperOrigin-RevId: 484352293
2 years ago
Joshua Haberman
6c4dc6f9e8
Merge pull request #873 from acozzette/update-cmake-files
...
Check in generated CMake files
2 years ago
Eric Salo
5c646803ef
implement mini descriptors for message sets
...
PiperOrigin-RevId: 484058392
2 years ago
Eric Salo
cb5be728d7
fix bug in mini descriptor map decoder
...
PiperOrigin-RevId: 483960513
2 years ago
Mike Kruskal
41017ef8dc
Fixes https://github.com/protocolbuffers/upb/issues/869
...
PiperOrigin-RevId: 483794621
2 years ago
Adam Cozzette
52be7c2960
Check in generated CMake files
...
Once the GitHub action is fixed, these will be auto-updated whenever
necessary. I realized it would be a good idea to add them back first,
though, just to make sure nothing breaks before we enable the
auto-updating.
2 years ago
Eric Salo
20310e2f3a
implement mini descriptors for maps
...
PiperOrigin-RevId: 483474044
2 years ago
Eric Salo
6f68ba1350
upb: fail if a message set contains any sub-fields
...
This was causing fuzzer test failures.
Unrelated: inlined a few calls to upb_MessageDef_FullName() for performance
PiperOrigin-RevId: 483389910
2 years ago
Eric Salo
067c7aa3f1
check for malformed map entries
...
PiperOrigin-RevId: 481258673
2 years ago
Eric Salo
a4f240c18b
backport a fuzzer test patch from an earlier github branch
...
PiperOrigin-RevId: 481251218
2 years ago
Mike Kruskal
9e2d7f02da
Support local builds of upb's python wheel build.
...
PiperOrigin-RevId: 481207184
2 years ago
Eric Salo
36ce2fa7d1
add version/tag chars to the start of all mini descriptors
...
Verified during decoding. The specific values are just placeholders for now.
PiperOrigin-RevId: 481009599
2 years ago
Eric Salo
df34b04658
make upb_ExtensionRegistry_AddArray() and upb_ExtensionRegistry_Lookup() public
...
Previously these were internal _upb functions but it turns out that they are also useful outside of upb.
PiperOrigin-RevId: 480997511
2 years ago
Mike Kruskal
fc73215f86
Internal change
...
PiperOrigin-RevId: 480942674
2 years ago
Mike Kruskal
72f7799d12
Internal change
...
PiperOrigin-RevId: 480925629
2 years ago
Eric Salo
40998462d6
add upb_MtDataEncoder_EncodeExtension()
...
We need to sharpen the distinction between messages and extensions in the mini
descriptor encoder, so split the code paths for each.
PiperOrigin-RevId: 480675339
2 years ago
Mike Kruskal
4e67cea19c
Internal changes
...
PiperOrigin-RevId: 480471896
2 years ago
Mike Kruskal
d861ff5411
Reserve C++20 keywords
...
PiperOrigin-RevId: 480445608
2 years ago
Protobuf Team Bot
be98a91367
Add aspect hints for kotlin native compilation.
...
PiperOrigin-RevId: 480421756
2 years ago
Copybara-Service
1f8f8abaf5
Merge pull request #853 from acozzette:cmake
...
PiperOrigin-RevId: 480375167
2 years ago
Adam Cozzette
4a9a7cacac
Add GitHub workflow for updating checked-in generated files
2 years ago
Eric Salo
85bf4677b2
lock down internal reflection
...
- upb_DefPool_FindExtensionByMiniTable() has been promoted to a public function.
- There are now zero uses of the internal reflection headers outside of upb core (but still a few left in generated code).
PiperOrigin-RevId: 480211522
2 years ago
Eric Salo
41335a03be
normalize upb_Message_New()
...
We had _upb_Message_New(), which created a message from a mini table and was
being used outside of upb even though it is an internal-only function.
We also had upb_Message_New(), which created a message from a message def.
Now there is a single public function, upb_Message_New(), which creates a
message from a mini table and covers all use cases. (The internal version has the same definition and is used for inlining.)
PiperOrigin-RevId: 480169804
2 years ago
Eric Salo
1a3803ce8b
dead code elimination
...
PiperOrigin-RevId: 479966581
2 years ago
Protobuf Team Bot
50d36a62b0
Add asserts for unlinked mini tables.
...
In particular upb doesn't handle unlinked groups yet which requires checks to make sure callers did link group subs.
PiperOrigin-RevId: 479702475
2 years ago
Eric Salo
85f7d2d065
set kUpb_EncodedValue_MaxField to its correct value
...
PiperOrigin-RevId: 479655389
2 years ago
Protobuf Team Bot
c172bfb4bc
Import numpy_test in upb wrapper from protobuf
...
PiperOrigin-RevId: 479637272
2 years ago
Protobuf Team Bot
04363f7bae
Update workspace_deps.bzl protobuf main commit
...
PiperOrigin-RevId: 479635174
2 years ago
Protobuf Team Bot
3faf958b3d
Initialize mini table subs, so that upb_MiniTable_Build creates stable unlinked table.
...
PiperOrigin-RevId: 479630135
2 years ago
Eric Salo
65946dc0e7
kUpb_EncodedType_Enum -> kUpb_EncodedType_OpenEnum
...
Now that we have a kUpb_EncodedType_ClosedEnum, rename for clarity.
PiperOrigin-RevId: 479621719
2 years ago