-
Notifications
You must be signed in to change notification settings - Fork 28
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
If any messages do not have a subfilter then don't introspect them. #40
If any messages do not have a subfilter then don't introspect them. #40
Conversation
Allows for unknown anys to be mapped Signed-off-by: Aidan Jensen <aidan@artificial.com>
I was thinking this might need an option, as it is technically breaking existing behavior, even if it is just erroring on fewer things. |
Set to true to maintain backwards compatibility Signed-off-by: Aidan Jensen <aidan@artificial.com>
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.
Could you please explain the benefits of not introspecting the unknown Any fields in the PR description?
Thanks!
Signed-off-by: Aidan Jensen <aidan@artificial.com>
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.
Looks good, thanks!
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #40 +/- ##
==========================================
+ Coverage 86.72% 88.16% +1.44%
==========================================
Files 2 2
Lines 482 490 +8
==========================================
+ Hits 418 432 +14
+ Misses 46 42 -4
+ Partials 18 16 -2 ☔ View full report in Codecov by Sentry. |
Thanks for contributing! |
Allows for unknown anys to be mapped. The current default behavior will always try and unmarshal protobuf any messages, which can cause an issue if the contained message is not in the descriptor pool. This adds an option to only map into any messages if their is a subfield in the mask, which allows copying of an any message as a whole from struct to struct