-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Multiple repeated fields are allowed #1921
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple repeated fields are allowed #1921
Conversation
The protobuffer comments have been corrected here: https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/field_mask.proto#L85-L86 The restriction was intended for the path string itself and not the entire mask. There can be only one repeated field in a path string, and when we get to it, the path string is done.
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
@googlebot I signed it! |
Codecov Report
@@ Coverage Diff @@
## master #1921 +/- ##
==========================================
- Coverage 57.96% 57.96% -0.01%
==========================================
Files 34 34
Lines 3771 3766 -5
==========================================
- Hits 2186 2183 -3
+ Misses 1311 1310 -1
+ Partials 274 273 -1
Continue to review full report at Codecov.
|
Thanks @topherCantrell! This was still on my list, but hadn't yet made it to the top. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this! Could you please add a new test case that exhibits the new behaviour too?
Testing multiple repeated fields
fixed test
fixed indents
There we go. A test for multiple repeats. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks a lot for this!
The repeated paths parsing that was introduced in #1921 was causing tests to fail sporadically as the output of the parser was not deterministic. Sort the paths after parsing for deterministic output.
The repeated paths parsing that was introduced in #1921 was causing tests to fail sporadically as the output of the parser was not deterministic. Sort the paths after parsing for deterministic output.
The protobuffer comments have been corrected here:
https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/field_mask.proto#L85-L86
The restriction was intended for the path string itself and not the
entire mask. There can be only one repeated field in a path string, and
when we get to it, the path string is done.
We found ourselves using multiple repeated fields in a message.
This fixes:
#1766