-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat: add support for maps #258
Conversation
Signed-off-by: Anthony Petrov <anthony@swirldslabs.com>
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesCodacy will stop sending the deprecated coverage status from June 5th, 2024. Learn more |
pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/impl/MapField.java
Outdated
Show resolved
Hide resolved
pbj-core/pbj-runtime/src/main/java/com/hedera/pbj/runtime/ProtoWriterTools.java
Show resolved
Hide resolved
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.
Impressive work, that was a lot of work :-)
pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/impl/Field.java
Show resolved
Hide resolved
...rc/main/java/com/hedera/pbj/compiler/impl/generators/protobuf/CodecParseMethodGenerator.java
Show resolved
Hide resolved
...rc/main/java/com/hedera/pbj/compiler/impl/generators/protobuf/CodecParseMethodGenerator.java
Show resolved
Hide resolved
...rc/main/java/com/hedera/pbj/compiler/impl/generators/protobuf/CodecParseMethodGenerator.java
Show resolved
Hide resolved
Signed-off-by: Anthony Petrov <anthony@swirldslabs.com>
Description:
Introducing support for map fields in PBJ.
I apologize for the size of the PR but it would be close to impossible to break it up into reasonable pieces because all the code is deeply interconnected and needs to be updated all at once when adding a new field type.
Short summary:
PbjMap
class that implements an immutable map and provides access to a list of sorted keys to support deterministic iteration over the map entries.skipDefault
-related changes are here to support just this.Related issue(s):
Fixes #254
Notes for reviewer:
map.proto
is added to test various maps.Checklist