The old design doc had fallen out of date. Now that upb's core design has stabilized, it's time for a new design doc that walks through all of upb's major abstractions. We start with arenas; future CLs will cover other aspects of upb's design.
PiperOrigin-RevId: 549048285
At some point, the typedef for upb_MiniTable, upb_MiniTableEnum and upb_MiniTableExtension were moved out of the internal headers and into the public ones, which requires usages of internal/file.h to import / resolve those public headers before it.
PiperOrigin-RevId: 548836379
pkg_files() has some odd quirks, like breaking if a filename exists in multiple directories. filegroup() does everything we need, without these quirks.
PiperOrigin-RevId: 547523447
This will move us towards keeping all these encapsulation breaks in a common place.
This also removes the IFTTT blocks. Keeping IFTTT blocks for each language would become unmanageable, but going forward we will know to look in `//third_party/upb/bits` whenever the internal data structures in upb change.
PiperOrigin-RevId: 547494495
upb has an implementation-specific maximum of 63 required fields per message. We need to verify this limit when building a MiniTable.
PiperOrigin-RevId: 546929196
This special `proto_library` behavior is known as an *alias library*:
https://bazel.build/reference/be/protocol-buffer#proto_library_args
Without this CL, the compilation of the added test fails with:
```
test_import_empty_srcs.upb.c:12:10: error:
module :test_import_empty_srcs_proto.upb does not depend on a
module exporting 'test.upb.h'
```
PiperOrigin-RevId: 545153380
- Add reference proxy type and change the scalar iterator to interact with it
- Add missing Iterator<T> -> Iterator<const T> conversion
- Add unit tests for reference and iterator types
- Add missing typedefs
- Add missing crbegin/crend functions
PiperOrigin-RevId: 544751376
After this change, `mini_table` only has MiniTable definitions themselves. Everything having to do with the MiniDescriptor wire format is in `mini_descriptor`.
Also rearranged some of the files in mini_table to have better structure for `internal/`.
This CL contains no functional change.
PiperOrigin-RevId: 543529112
Update signatures to use T* Ptr<T> consistently.
Cross language blocks utility updated to use GetArena(T*)
Fixes arena_ for Proxy/CProxy ::Access class now consistently fills in arena_ (where message was created in).
PiperOrigin-RevId: 543457599
Move to a friend nonmember functions taking both arguments by reference-to-const.
Closes#1199
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/upb/pull/1199 from phallot:fix/ambiguous-reversed-operator 4ef9f65e7539df330943a55e257b5f8a87a208ca
PiperOrigin-RevId: 542572888
This fixes cases where the interpreter cannot be executed, as there is no indication about how to execute it.
Fixes#1212Closes#1336
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/upb/pull/1336 from vthib:1212-python-interpreter-shebang 956482d9665c15f4781b16d7fa3da45a6615aa54
PiperOrigin-RevId: 541927182
- Match build target names to their corresponding file names (remove stuttering)
- Replace a dep on (deprecated) :upb with a dep on :wire
- Mark :struct_upb_proto as testonly
- Group the cc_test targets together
PiperOrigin-RevId: 541408625
I recently ran into an issue with public imports and the `protos` generator.
The includes of fwd.h files are currently generated based on where the message
or extension is defined, but when public imports are involved, this fwd.h
header might not be in the direct dependencies. When the `#include` points to a
transitive dependency then this can result in a layering violation.
This CL fixes the problem by generating fwd.h includes for all direct
dependencies, and making sure the fwd.h files themselves contain `#include`
lines to export their public dependencies.
PiperOrigin-RevId: 540102455