-
Notifications
You must be signed in to change notification settings - Fork 7k
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
CapnProtoInputStream jagged structures #4063
Conversation
Changed how actions are created for CapnProto so it supports jagged structures.
Added _ as delim This makes it so you do not have to use . when addresing structures and since Capnproto can not use _ in its naming its fine to use.
- Added some comments. - Immplemented a recurisve parent check so fields with parents by the same name but grandparents with diffrent names dont cause problems
Missing test. |
Okay, not sure what you want me to use instead of the "checkEqualFrom" function, please elaborate. |
I have some troubles reading this code and I've removed the function |
I've fixed build but your test is not passed:
|
How did you generated Cap'n'Proto test message? |
With the cli tool |
Ok. The code is a bit difficult to understand for me. I have rewritten it a little and now the test passed. (and add more tests if needed in separate PR) |
I'm sorry this is a little late. It looks good, i also did some manual testing and wrote two additional tests that takes care of edge cases if there are changes in the future. |
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en
For changelog. Remove if this is non-significant change.
Category:
Short description:
Changed the way CapnProtoInputStream creates actions in such a way that it now support structures that are jagged.
Detailed description:
CapnProtoInputStream only worked with CapnProto objects where at most one child could have children of its own.
To fix backtracking was implemented.
Also, added '' as separator in addition to '.', this should not cause problems since '' is not allowed in CapnProto names.