-
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
Update ZAP to version that generates min/max information. #12325
Update ZAP to version that generates min/max information. #12325
Conversation
The XML updates are based on examining the all-clusters app codegen and removing spurious min-max constraints that just restate the value range of the type (e.g. setting max to 0xFFFF for an int16u). A few attributes were made nullable in the process to remove an unnecessary constraint like max="0xFFFE" when the spec says range is all but the attribute is nullable.
PR #12325: Size comparison from 2bd6bd6 to 16db7cd Increases above 0.2%:
Increases (20 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
Decreases (19 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg)
Full report (38 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
@bzbarsky-apple The |
Yep, I am working on fixing that right now. ;) |
6eccb06
to
29b79a2
Compare
29b79a2
to
c3ab4d9
Compare
PR #12325: Size comparison from ef9c86c to c3ab4d9 Increases above 0.2%:
Increases (12 builds for efr32, k32w, linux, p6, qpg, telink)
Decreases (3 builds for k32w, linux, qpg)
Full report (21 builds for efr32, k32w, linux, p6, qpg, telink)
|
…texpr. This should ensure that it does not accidentally end up in .data instead of .rodata. The main fix here is adding the constexpr constructor for EmberAfDefaultOrMinMaxAttributeValue that takes a EmberAfAttributeMinMaxValue*, which lets us remove the non-constexpr reinterpret_cast (coming from the C-style cast) to uint8_t* in ZAP_MIN_MAX_DEFAULTS_INDEX. The other fixes are just fixing long-standing const-correctness issues; this allows us to remove the implicit const_cast from ZAP_LONG_DEFAULTS_INDEX.
c3ab4d9
to
45566eb
Compare
PR #12325: Size comparison from 489de97 to 45566eb Increases above 0.2%:
Increases (20 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
Decreases (3 builds for k32w, linux, qpg)
Full report (38 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
@saurabhst @msandstedt @Damian-Nordic @LuDuda @vivien-apple @woody-apple @jmartinez-silabs @jepenven-silabs could you please take a look? |
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.
Fast tracking this, given this is adding functionality for tests.
The XML updates are based on examining the all-clusters app codegen
and removing spurious min-max constraints that just restate the value
range of the type (e.g. setting max to 0xFFFF for an int16u). A few
attributes were made nullable in the process to remove an unnecessary
constraint like max="0xFFFE" when the spec says range is all but the
attribute is nullable.
Problem
min/max in XML are ignored in our codegen.
Change overview
Output min/max information in the generated endpoint_config.
Testing
Code inspection. yaml tests are forthcoming, in followup PRs.