-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Add basic codegen and Encode/Decode support for nullable and optional struct/command/event fields #10891
Merged
woody-apple
merged 3 commits into
project-chip:master
from
bzbarsky-apple:nullable-optional
Oct 27, 2021
Merged
Add basic codegen and Encode/Decode support for nullable and optional struct/command/event fields #10891
woody-apple
merged 3 commits into
project-chip:master
from
bzbarsky-apple:nullable-optional
Oct 27, 2021
Conversation
This file contains 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
pullapprove
bot
requested review from
andy31415,
anush-apple,
balducci-apple,
carol-apple,
cecille,
chrisdecenzo,
chulspro,
Damian-Nordic,
emargolis,
franck-apple,
harimau-qirex,
hawk248,
holbrookt,
jelderton,
jepenven-silabs,
jmartinez-silabs,
kghost,
LuDuda,
msandstedt,
mspang and
pan-apple
October 23, 2021 05:52
pullapprove
bot
requested review from
sagar-apple,
saurabhst,
tcarmelveilleux,
tecimovic,
wbschiller,
woody-apple and
yunhanw-google
October 23, 2021 05:52
woody-apple
approved these changes
Oct 23, 2021
PR #10891: Size comparison from 682b650 to 65423ee 8 builds (for k32w, p6, qpg, telink)
12 builds (for efr32, linux)
15 builds (for esp32, mbed, nrfconnect)
|
mrjerryjohns
suggested changes
Oct 25, 2021
Affects command fields, event fields, struct fields.
bzbarsky-apple
force-pushed
the
nullable-optional
branch
from
October 26, 2021 20:16
65423ee
to
e9612f5
Compare
yunhanw-google
approved these changes
Oct 26, 2021
Size increase report for "gn_qpg-example-build" from 3f7465f
Full report output
|
mrjerryjohns
approved these changes
Oct 26, 2021
Size increase report for "esp32-example-build" from 3f7465f
Full report output
|
Size increase report for "nrfconnect-example-build" from 3f7465f
Full report output
|
Fast tracking, has approvals and is past the timeframe required |
JasonLiuZhuoCheng
pushed a commit
to JasonLiuZhuoCheng/connectedhomeip
that referenced
this pull request
Oct 28, 2021
… struct/command/event fields (project-chip#10891) * Add basic support for nullable and optional fields. Affects command fields, event fields, struct fields. * Add some unit tests for nullable and optional encode/decode * Add simple optional/nullable end-to-end test.
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.
Problem
The types and helper code we generate for nullable or optional struct/command/event fields ignores the nullability and optionality. In particular, for a nullable field there is no way to encode it using cluster-objects, and decoding will fail if null is sent.
Change overview
Testing
New test passes. Lots more work to do to make this work in general, though.