-
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
Use field identifiers when code gen struct items #12222
Use field identifiers when code gen struct items #12222
Conversation
Field identifiers were not being used. Instead, the order of field identifiers was used, with ordinal (0 to N-1) indexes. This is likely true of other code generated elements, but this PR only fixes it for struct items. This PR requires PR project-chip#326 in the third_party/zap/repo to function, as that PR actually includes the field identifier in the query results. Tested by running Matter cert tests, and also by inspecting the generated code for correctness.
PR #12222: Size comparison from 8bfdc13 to 175f2d3 Full report (38 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
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 catch!
Updated submodule, ran cert tests, so good to go. (Not sure why it says there's a conflict in the zap repo...) |
Argh, looks like master changed while I was updating this PR, between my merging master and updating the submodule. |
fast track - basic change, but requires zap merging |
PR #12222: Size comparison from 15929eb to 6e0ebb6 Full report (9 builds for k32w, p6, qpg, telink)
|
Re-ran cert tests.
Updated the couple generated files that changed. Re-ran cert tests. Should be good now? |
PR #12222: Size comparison from 15929eb to 2950fb4 Increases (3 builds for esp32, linux, p6)
Decreases (1 build for esp32)
Full report (38 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
Removed fast track: has sufficient checkmarks |
PR #12222: Size comparison from 9834f97 to 7d05851 Increases (2 builds for esp32, linux)
Decreases (1 build for esp32)
Full report (38 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
Problem
Field identifiers were not being used. Instead, the order of field
identifiers was used, with ordinal (0 to N-1) indexes.
This is likely true of other code generated elements, but this PR only
fixes it for struct items.
Change overview
Generate struct field IDs code properly with actual fieldId rather than index.
This PR requires PR #326 in the third_party/zap/repo to function,
as that PR actually includes the field identifier in the query
results.
Testing
Tested by running Matter cert tests, and also by inspecting the
generated code for correctness.