-
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
Make attributes whose values are lists of structs that have nullables/optionals at least compile. #11105
Make attributes whose values are lists of structs that have nullables/optionals at least compile. #11105
Conversation
Add support for printing list member of struct element of list attribute }}connectedhomeip/examples/chip-tool/templates/commands.zapt Lines 172 to 182 in cb9ce4a
This comment was generated by todo based on a
|
Add support for printing struct member of struct element of list attribute }}connectedhomeip/examples/chip-tool/templates/commands.zapt Lines 179 to 189 in cb9ce4a
This comment was generated by todo based on a
|
Add support for structs here }}{{else if (isString type)}}{{#if (isOctetString type)}}[B{{else}}Ljava/lang/String;{{/if}}{{else}}{{asJniSignature type}}{{/if}}{{/chip_attribute_list_entryTypes}})V");connectedhomeip/src/controller/java/templates/CHIPClusters-JNI.zapt Lines 451 to 454 in cb9ce4a
This comment was generated by todo based on a
|
Add support for optional types here }}connectedhomeip/src/controller/java/templates/CHIPClusters-JNI.zapt Lines 462 to 472 in cb9ce4a
This comment was generated by todo based on a
|
Add support for nullable types here }}connectedhomeip/src/controller/java/templates/CHIPClusters-JNI.zapt Lines 464 to 472 in cb9ce4a
This comment was generated by todo based on a
|
Add support for lists here }}connectedhomeip/src/controller/java/templates/CHIPClusters-JNI.zapt Lines 466 to 472 in cb9ce4a
This comment was generated by todo based on a
|
Add support for structs here }}connectedhomeip/src/controller/java/templates/CHIPClusters-JNI.zapt Lines 468 to 472 in cb9ce4a
This comment was generated by todo based on a
|
Add support for optional types here }}connectedhomeip/src/controller/java/templates/CHIPClusters-JNI.zapt Lines 483 to 493 in cb9ce4a
This comment was generated by todo based on a
|
Add support for nullable types here }}connectedhomeip/src/controller/java/templates/CHIPClusters-JNI.zapt Lines 485 to 495 in cb9ce4a
This comment was generated by todo based on a
|
Add support for lists here }}connectedhomeip/src/controller/java/templates/CHIPClusters-JNI.zapt Lines 487 to 495 in cb9ce4a
This comment was generated by todo based on a
|
Add support for structs here }}connectedhomeip/src/controller/java/templates/CHIPClusters-JNI.zapt Lines 489 to 495 in cb9ce4a
This comment was generated by todo based on a
|
Add support for optional types here }}connectedhomeip/src/controller/java/templates/ChipClusters-java.zapt Lines 114 to 124 in cb9ce4a
This comment was generated by todo based on a
|
Add support for nullable types here }}connectedhomeip/src/controller/java/templates/ChipClusters-java.zapt Lines 116 to 124 in cb9ce4a
This comment was generated by todo based on a
|
Add support for lists here }}connectedhomeip/src/controller/java/templates/ChipClusters-java.zapt Lines 118 to 124 in cb9ce4a
This comment was generated by todo based on a
|
Add support for structs here }}connectedhomeip/src/controller/java/templates/ChipClusters-java.zapt Lines 120 to 124 in cb9ce4a
This comment was generated by todo based on a
|
Add support for structs here }}{{else if (isString type)}}{{#if (isOctetString type)}}[B{{else}}Ljava/lang/String;{{/if}}{{else}}{{asJniSignature type}}{{/if}}{{/chip_attribute_list_entryTypes}})V");connectedhomeip/src/controller/java/templates/CHIPClusters-JNI.zapt Lines 451 to 454 in 9779e59
This comment was generated by todo based on a
|
PR #11105: Size comparison from 36329e1 to 9779e59 Increases above 0.2%:
Increases (2 builds for linux)
Full report (20 builds for efr32, k32w, linux, p6, qpg, telink)
|
9779e59
to
6b2d9a9
Compare
Add support for structs here }}{{else if (isString type)}}{{#if (isOctetString type)}}[B{{else}}Ljava/lang/String;{{/if}}{{else}}{{asJniSignature type}}{{/if}}{{/chip_attribute_list_entryTypes}})V");connectedhomeip/src/controller/java/templates/CHIPClusters-JNI.zapt Lines 451 to 454 in 6b2d9a9
This comment was generated by todo based on a
|
PR #11105: Size comparison from 36329e1 to 6b2d9a9 Increases above 0.2%:
Increases (5 builds for esp32, linux, mbed)
Full report (37 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
…/optionals at least compile. This doesn't give us correct behavior across all of our bindings (chip-tool command line, yaml, darwin, python, java). But it at least allows code generation to produce output and allows that output to compile. More work is needed to address the various TODO issues.
6b2d9a9
to
80ddf15
Compare
Add support for structs here }}{{else if (isString type)}}{{#if (isOctetString type)}}[B{{else}}Ljava/lang/String;{{/if}}{{else}}{{asJniSignature type}}{{/if}}{{/chip_attribute_list_entryTypes}})V");connectedhomeip/src/controller/java/templates/CHIPClusters-JNI.zapt Lines 451 to 454 in 80ddf15
This comment was generated by todo based on a
|
PR #11105: Size comparison from 69423bc to 80ddf15 Increases above 0.2%:
Increases (5 builds for esp32, linux, mbed)
Full report (37 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
…/optionals at least compile. (project-chip#11105) This doesn't give us correct behavior across all of our bindings (chip-tool command line, yaml, darwin, python, java). But it at least allows code generation to produce output and allows that output to compile. More work is needed to address the various TODO issues.
This doesn't give us correct behavior across all of our bindings
(chip-tool command line, yaml, darwin, python, java). But it at least
allows code generation to produce output and allows that output to
compile.
More work is needed to address the various TODO issues.
Problem
Adding an attribute whose type is a list of structs which can have optional or nullable members fails to compile. And if those members are "interesting" enough (structs, lists), fails to codegen.
Change overview
Make those cases at least codegen succcessfully, though at the cost of ignoring a bunch of struct members in various places.
Testing
Ran codegen locally and compiled.