Try using upb_proto_library rules#23168
Closed
jtattermusch wants to merge 64 commits intogrpc:masterfrom
Closed
Conversation
ce1a399a19 Text format serializer for upb_msg (grpc#242) 888f35cae6 Merge pull request grpc#241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request grpc#234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request grpc#224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
4c6dcc3c6b [textformat]: added missing newline when a message opens. (grpc#245) git-subtree-dir: third_party/upb git-subtree-split: 4c6dcc3c6bdb7039995768bf5f95ac2c4a6e9102
ca84145476 [decoder] fix for buf=NULL, size=0 case. (grpc#246) git-subtree-dir: third_party/upb git-subtree-split: ca84145476ddd722c6d67d7cf985d1d0aefcd893
bb2db35464 Fixing Windows build. (grpc#247) git-subtree-dir: third_party/upb git-subtree-split: bb2db35464dec97d180a21c3fc4a890799fb7785
02c89a8b15 Renamed textencode -> text_encode for greater readability. (grpc#249) git-subtree-dir: third_party/upb git-subtree-split: 02c89a8b15d0ce2a4a75ef16fc398913827354fd
e70853d71f Merge pull request grpc#251 from haberman/emptyfix b409f8cd85 Fixed code generator for upbdefs when a file has no messages. 58010a3f73 Another fix for google import. 4b8c04e521 Ran buildifier and fixed a few things for google3 import. 95fb9b2e38 Merge pull request grpc#250 from haberman/jsonencode d7d72f0075 Updated CMakeLists.txt. 872f4ceb8f [json encoder] passes all conformance tests. 384cf15b0f [json encoder] passes almost all conformance tests. 6e9db7dafc Fixed JSON encoder so that it compiles. 43d8673623 Merge branch 'master' into jsonencode 60d0966a0b [jsonencoder]: wrote most of the code, haven't even compiled yet, let alone tested. 1da9cfde77 A few bugfixes. git-subtree-dir: third_party/upb git-subtree-split: e70853d71f3db513f3d19a7842e0703bfa56d6a5
543a0ce8f2 Fixes for PHP. (grpc#286) 93e2a40881 MSVC 2019 Fixes (grpc#285) a1c2caeb25 More arena tests. (grpc#279) 16facab490 Created an amalgamation without handlers, and fixed some bugs. (grpc#283) 22182e6e54 Simplified epoch day algorithm. (grpc#282) 55f5bcd62c Add upb_symtab_lookupfile2 (grpc#281) c26e8db53d Ignore Unknown Enum Value (grpc#280) 6c4acba610 Implemented upb_arena_fuse() (grpc#278) 2b1e7dc1cc Arena refactor: moves cleanup list into regular blocks (grpc#277) a0ae30bd16 Remove bytes allocated measurement functions. (grpc#276) 025cc2ec3d New arena benchmarks that actually hit the heap. (grpc#275) cef720e9b0 Parser bugfix and updated generated file. (grpc#273) 262bcbcada Updated generated files. (grpc#274) 0842f88211 Support for proto3 optional. (grpc#270) d638d74d1b Add load statements for @rules_proto (grpc#271) 2559e78aa3 Separated C++ wrappers into separate files in a backward-compatible way. (grpc#265) 9bd23dab42 Changed upb status to suit GCC10's warning about strncpy(). (grpc#268) 38a1045975 Added a has_foo() generated method for proto3 submessage fields. (grpc#266) ef25ea5281 Added Kokoro verification of the ASAN build. (grpc#220) 378cbbc3cc Updated to new protobuf version, and added support for packed=false. (grpc#264) 08b6d2d6fd Rewrite of the decoder (grpc#263) git-subtree-dir: third_party/upb git-subtree-split: 543a0ce8f21709fe7e65ac5a53cc4136d7b4216c
7f5b8d73b0 Merge pull request grpc#287 from haberman/php-amalgamation 634d37515c Bugfix for oneofs and added line/col info to JSON. git-subtree-dir: third_party/upb git-subtree-split: 7f5b8d73b0d1a481b279de3c6a558015ae1adca5
b717575cef Added -Wextra and -Wshorten-64-to-32 and fixed resulting errors. (grpc#289) 2e335ab9d2 Merge pull request grpc#288 from haberman/ubsan 408d34797d Disable UBSan, Clang is not available in upb's Kokoro image atm. 6b808a4072 Fixed all UBSan issues and added UBSan CI checks. git-subtree-dir: third_party/upb git-subtree-split: b717575ceff5e759a28f3ed3d60a65eee041a30c
363e39c171 Fix for extra compiler warnings. (grpc#290) git-subtree-dir: third_party/upb git-subtree-split: 363e39c171a08b89bd546189d1244a6e191cacf0
- also accept upb rules - expansion of upb protos - stop flattening grpc_health_upb lib - try converting grpc_health_upb
Contributor
Author
Contributor
Author
|
Looks like this PR might actually be working just fine (let's wait for the test results). |
markdroth
added a commit
to markdroth/grpc
that referenced
this pull request
Jun 9, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based on #21905
The most interesting changes are in this commit 6fbe1b8
(after which I've regenerated the projects in the next commit).
Some extra explanation for the changes:
we needed to whitelist the
upb_proto_libraryandupb_proto_reflection_libraryrules.I added a tweak that replaces .proto sources with their pre-generated .upb.c and upb.h counterparts, but the interesting bit is that this must only be done for the libraries where actually want to use the UPB code (there are other .proto dependencies where we want the regular protobuf).
To be able to detect which libraries are supposed to use upb and which ones are using regular protobuf, I explicitly defined e.g.
grpc_health_upblibrary to show up in the build_autogenerated.yaml. Normally, the extract_metadata_from_bazel_xml.py flattens the dependency tree by removing the intermediate deps such asgrpc_health_upb(by expanding their sources and headers whenver they are referenced). The above trick of replacing upb .proto files with the generated .upb.cc and upb.h would work even with dependency flattening in place, but the flattening makes is harder to detect which .proto files should be generated with UPB and which should use regular protobuf.I only made the change for grpc_health_upb, but the changes for other upb_proto libraries should be analogous.