Skip to content
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

Restore Darwin APIs that went missing. #31163

Merged

Conversation

bzbarsky-apple
Copy link
Contributor

We were inconsistent about our checks for the "allowed to not have params" case: some places used "command has no fields" as the check, and some used "command has only optional fields".

This caused some APIs (for invoking commands with no params) to disappear when commands that used to have no fields got optional fields added to them.

The fix:

  1. Fixes the checks to consistently be "command has only optional fields" so the no-params APIs continue to exist for the commands that had optional fields added to them.
  2. Fixes availability annotations for pre-existing commands with only optional fields so that we will not claim the no-params API is available before it was actually available, by basically listing all such commands in config-data.yaml.
  3. Avoids generating deprecated overloads for the thins listed in item 2.
  4. Moves the Darwin-only bits from the config-data.yaml in src/app into the Darwin version we are adding, and starts using that config file.

We were inconsistent about our checks for the "allowed to not have params" case:
some places used "command has no fields" as the check, and some used "command
has only optional fields".

This caused some APIs (for invoking commands with no params) to disappear when
commands that used to have no fields got optional fields added to them.

The fix:

1. Fixes the checks to consistently be "command has only optional fields" so the
   no-params APIs continue to exist for the commands that had optional fields
   added to them.
2. Fixes availability annotations for pre-existing commands with only optional
   fields so that we will not claim the no-params API is available before it was
   actually available, by basically listing all such commands in
   config-data.yaml.
3. Avoids generating deprecated overloads for the thins listed in item 2.
4. Moves the Darwin-only bits from the config-data.yaml in src/app into the
   Darwin version we are adding, and starts using that config file.
Copy link

github-actions bot commented Dec 21, 2023

PR #31163: Size comparison from 52f66e1 to e851c76

Decreases (1 build for efr32)
platform target config section 52f66e1 e851c76 change % change
efr32 lighting-app BRD4187C (read/write) 1101276 1101268 -8 -0.0
.text 901692 901684 -8 -0.0
Full report (72 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
platform target config section 52f66e1 e851c76 change % change
bl602 lighting-app bl602 (read/write) 1418314 1418314 0 0.0
.bss 85224 85224 0 0.0
.data 9416 9416 0 0.0
.rodata 156968 156968 0 0.0
.text 1086064 1086064 0 0.0
bl602+mfd (read/write) 1432786 1432786 0 0.0
.bss 85392 85392 0 0.0
.data 9384 9384 0 0.0
.rodata 155928 155928 0 0.0
.text 1101432 1101432 0 0.0
bl602+rpc (read/write) 1466098 1466098 0 0.0
.bss 93256 93256 0 0.0
.data 9784 9784 0 0.0
.rodata 164592 164592 0 0.0
.text 1117808 1117808 0 0.0
bl702 lighting-app bl702 (read only) 3478 3478 0 0.0
(read/write) 1183315 1183315 0 0.0
.bss 11197 11197 0 0.0
.data 3584 3584 0 0.0
.rodata 106344 106344 0 0.0
.text 955750 955750 0 0.0
bl702+mfd (read only) 3478 3478 0 0.0
(read/write) 1194447 1194447 0 0.0
.bss 11373 11373 0 0.0
.data 3568 3568 0 0.0
.rodata 105284 105284 0 0.0
.text 967814 967814 0 0.0
bl702+rpc (read only) 3478 3478 0 0.0
(read/write) 1275327 1275327 0 0.0
.bss 19677 19677 0 0.0
.data 4144 4144 0 0.0
.rodata 121764 121764 0 0.0
.text 1030812 1030812 0 0.0
bl706-eth (read/write) 1002941 1002941 0 0.0
.bss 23772 23772 0 0.0
.data 3160 3160 0 0.0
.rodata 99676 99676 0 0.0
.text 748646 748646 0 0.0
bl706-wifi (read/write) 1241162 1241162 0 0.0
.bss 10641 10641 0 0.0
.data 3600 3600 0 0.0
.rodata 120656 120656 0 0.0
.text 976028 976028 0 0.0
bl702l lighting-app bl702l (read/write) 1153532 1153532 0 0.0
.bss 16392 16392 0 0.0
.data 4952 4952 0 0.0
.rodata 100348 100348 0 0.0
.text 948876 948876 0 0.0
bl702l+mfd (read only) 512 512 0 0.0
(read/write) 1164472 1164472 0 0.0
.bss 16568 16568 0 0.0
.data 4928 4928 0 0.0
.rodata 99288 99288 0 0.0
.text 961252 961252 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 (read only) 771928 771928 0 0.0
(read/write) 168164 168164 0 0.0
.bss 90500 90500 0 0.0
.data 3460 3460 0 0.0
.rodata 89560 89560 0 0.0
.text 682104 682104 0 0.0
lock-ftd LP_EM_CC1354P10_6 (read only) 788024 788024 0 0.0
(read/write) 178392 178392 0 0.0
.bss 100676 100676 0 0.0
.data 3488 3488 0 0.0
.rodata 83808 83808 0 0.0
.text 703948 703948 0 0.0
lock-mtd LP_EM_CC1354P10_6 (read only) 776264 776264 0 0.0
(read/write) 172848 172848 0 0.0
.bss 95132 95132 0 0.0
.data 3488 3488 0 0.0
.rodata 110416 110416 0 0.0
.text 665580 665580 0 0.0
pump-app LP_EM_CC1354P10_6 (read only) 728864 728864 0 0.0
(read/write) 167160 167160 0 0.0
.bss 89272 89272 0 0.0
.data 3448 3448 0 0.0
.rodata 85136 85136 0 0.0
.text 643464 643464 0 0.0
pump-controller-app LP_EM_CC1354P10_6 (read only) 714408 714408 0 0.0
(read/write) 167340 167340 0 0.0
.bss 89456 89456 0 0.0
.data 3444 3444 0 0.0
.rodata 80968 80968 0 0.0
.text 633176 633176 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL (read only) 567322 567322 0 0.0
(read/write) 207716 207716 0 0.0
.bss 201180 201180 0 0.0
.data 1412 1412 0 0.0
.rodata 83954 83954 0 0.0
.text 481248 481248 0 0.0
lock CC3235SF_LAUNCHXL (read only) 620650 620650 0 0.0
(read/write) 208112 208112 0 0.0
.bss 201544 201544 0 0.0
.data 1448 1448 0 0.0
.rodata 105826 105826 0 0.0
.text 512704 512704 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 561311 561311 0 0.0
.app_xip_area 451497 451497 0 0.0
.bss 64728 64728 0 0.0
.data 660 660 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 543551 543551 0 0.0
.app_xip_area 429001 429001 0 0.0
.bss 69424 69424 0 0.0
.data 700 700 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor cyw930739m2evb_01 (read/write) 562263 562263 0 0.0
.app_xip_area 453905 453905 0 0.0
.bss 63344 63344 0 0.0
.data 588 588 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
switch cyw930739m2evb_01 (read/write) 557719 557719 0 0.0
.app_xip_area 446137 446137 0 0.0
.bss 66464 66464 0 0.0
.data 696 696 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A+rs9116 (read/write) 1017428 1017428 0 0.0
.bss 172664 172664 0 0.0
.data 2688 2688 0 0.0
.text 842056 842056 0 0.0
BRD4187C (read/write) 1101276 1101268 -8 -0.0
.bss 196268 196268 0 0.0
.data 3296 3296 0 0.0
.text 901692 901684 -8 -0.0
lock-app BRD4161A+wf200 (read/write) 1115136 1115136 0 0.0
.bss 188880 188880 0 0.0
.data 2712 2712 0 0.0
.text 923524 923524 0 0.0
window-app BRD4187C (read/write) 1136168 1136168 0 0.0
.bss 168300 168300 0 0.0
.data 3168 3168 0 0.0
.text 964680 964680 0 0.0
esp32 all-clusters-app c3devkit (read only) 1138050 1138050 0 0.0
(read/write) 1671636 1671636 0 0.0
.dram0.bss 72936 72936 0 0.0
.dram0.data 12988 12988 0 0.0
.flash.rodata 241840 241840 0 0.0
.flash.text 1138050 1138050 0 0.0
.iram0.text 75694 75694 0 0.0
m5stack (read only) 1183103 1183103 0 0.0
(read/write) 520836 520836 0 0.0
.dram0.bss 79584 79584 0 0.0
.dram0.data 34004 34004 0 0.0
.flash.rodata 272884 272884 0 0.0
.flash.text 1177719 1177719 0 0.0
.iram0.text 123907 123907 0 0.0
k32w contact k32w0+release (read only) 605424 605424 0 0.0
(read/write) 81960 81960 0 0.0
.bss 69808 69808 0 0.0
.data 2168 2168 0 0.0
.text 604888 604888 0 0.0
k32w1+release (read only) 1024 1024 0 0.0
(read/write) 691000 691000 0 0.0
.bss 67664 67664 0 0.0
.data 2716 2716 0 0.0
.text 577144 577144 0 0.0
light k32w0+release (read only) 595128 595128 0 0.0
(read/write) 79176 79176 0 0.0
.bss 67072 67072 0 0.0
.data 2120 2120 0 0.0
.text 594592 594592 0 0.0
k32w1+release (read only) 1024 1024 0 0.0
(read/write) 782820 782820 0 0.0
.bss 77340 77340 0 0.0
.data 1928 1928 0 0.0
.text 660096 660096 0 0.0
lock k32w0+release (read only) 576520 576520 0 0.0
(read/write) 79440 79440 0 0.0
.bss 67360 67360 0 0.0
.data 2096 2096 0 0.0
.text 575984 575984 0 0.0
linux air-purifier-app debug (read only) 2526997 2526997 0 0.0
(read/write) 127240 127240 0 0.0
.bss 46944 46944 0 0.0
.data 1472 1472 0 0.0
.data.rel.ro 72856 72856 0 0.0
.dynamic 608 608 0 0.0
.got 4552 4552 0 0.0
.init 27 27 0 0.0
.init_array 800 800 0 0.0
.rodata 179304 179304 0 0.0
.text 2172293 2172293 0 0.0
all-clusters-app debug (read only) 5416385 5416385 0 0.0
(read/write) 456264 456264 0 0.0
.bss 131632 131632 0 0.0
.data 3840 3840 0 0.0
.data.rel.ro 313544 313544 0 0.0
.dynamic 624 624 0 0.0
.got 5336 5336 0 0.0
.init 27 27 0 0.0
.init_array 1264 1264 0 0.0
.rodata 312540 312540 0 0.0
.text 4693123 4693123 0 0.0
all-clusters-minimal-app debug (read only) 4953705 4953705 0 0.0
(read/write) 234720 234720 0 0.0
.bss 127856 127856 0 0.0
.data 3776 3776 0 0.0
.data.rel.ro 95992 95992 0 0.0
.dynamic 624 624 0 0.0
.got 5296 5296 0 0.0
.init 27 27 0 0.0
.init_array 1160 1160 0 0.0
.rodata 272461 272461 0 0.0
.text 4448787 4448787 0 0.0
bridge-app debug (read only) 4417809 4417809 0 0.0
(read/write) 215960 215960 0 0.0
.bss 119224 119224 0 0.0
.data 4704 4704 0 0.0
.data.rel.ro 85312 85312 0 0.0
.dynamic 624 624 0 0.0
.got 5264 5264 0 0.0
.init 27 27 0 0.0
.init_array 824 824 0 0.0
.rodata 219157 219157 0 0.0
.text 3980083 3980083 0 0.0
chip-tool debug (read only) 11735377 11735377 0 0.0
(read/write) 505872 505872 0 0.0
.bss 94200 94200 0 0.0
.data 4994 4994 0 0.0
.data.rel.ro 399440 399440 0 0.0
.dynamic 624 624 0 0.0
.got 5784 5784 0 0.0
.init 27 27 0 0.0
.init_array 784 784 0 0.0
.rodata 426313 426313 0 0.0
.text 10616563 10616563 0 0.0
chip-tool-ipv6only arm64 (read only) 11457256 11457256 0 0.0
(read/write) 574472 574472 0 0.0
.bss 103448 103448 0 0.0
.data 4288 4288 0 0.0
.data.rel.ro 438384 438384 0 0.0
.dynamic 512 512 0 0.0
.got 19856 19856 0 0.0
.init 24 24 0 0.0
.init_array 248 248 0 0.0
.rodata 346864 346864 0 0.0
.text 10239608 10239608 0 0.0
lighting-app debug+rpc+ui (read only) 5303609 5303609 0 0.0
(read/write) 225032 225032 0 0.0
.bss 119360 119360 0 0.0
.data 4416 4416 0 0.0
.data.rel.ro 93728 93728 0 0.0
.dynamic 672 672 0 0.0
.got 5880 5880 0 0.0
.init 27 27 0 0.0
.init_array 960 960 0 0.0
.rodata 340340 340340 0 0.0
.text 4718483 4718483 0 0.0
lock-app debug (read only) 4502849 4502849 0 0.0
(read/write) 203680 203680 0 0.0
.bss 113760 113760 0 0.0
.data 3648 3648 0 0.0
.data.rel.ro 79544 79544 0 0.0
.dynamic 624 624 0 0.0
.got 5216 5216 0 0.0
.init 27 27 0 0.0
.init_array 856 856 0 0.0
.rodata 246997 246997 0 0.0
.text 4045827 4045827 0 0.0
ota-provider-app debug (read only) 4166985 4166985 0 0.0
(read/write) 192728 192728 0 0.0
.bss 113632 113632 0 0.0
.data 3904 3904 0 0.0
.data.rel.ro 69312 69312 0 0.0
.dynamic 624 624 0 0.0
.got 4528 4528 0 0.0
.init 27 27 0 0.0
.init_array 720 720 0 0.0
.rodata 201269 201269 0 0.0
.text 3773843 3773843 0 0.0
ota-requestor-app debug (read only) 4256441 4256441 0 0.0
(read/write) 197040 197040 0 0.0
.bss 114656 114656 0 0.0
.data 4176 4176 0 0.0
.data.rel.ro 72320 72320 0 0.0
.dynamic 624 624 0 0.0
.got 4464 4464 0 0.0
.init 27 27 0 0.0
.init_array 776 776 0 0.0
.rodata 205077 205077 0 0.0
.text 3855091 3855091 0 0.0
shell debug (read only) 2789433 2789433 0 0.0
(read/write) 152304 152304 0 0.0
.bss 62312 62312 0 0.0
.data 768 768 0 0.0
.data.rel.ro 83432 83432 0 0.0
.dynamic 592 592 0 0.0
.got 4088 4088 0 0.0
.init 27 27 0 0.0
.init_array 1088 1088 0 0.0
.rodata 181888 181888 0 0.0
.text 2436482 2436482 0 0.0
thermostat-no-ble arm64 (read only) 4406424 4406424 0 0.0
(read/write) 244048 244048 0 0.0
.bss 122232 122232 0 0.0
.data 2784 2784 0 0.0
.data.rel.ro 102384 102384 0 0.0
.dynamic 512 512 0 0.0
.got 12008 12008 0 0.0
.init 24 24 0 0.0
.init_array 424 424 0 0.0
.rodata 162276 162276 0 0.0
.text 3903752 3903752 0 0.0
tv-app debug (read only) 5402953 5402953 0 0.0
(read/write) 349208 349208 0 0.0
.bss 244608 244608 0 0.0
.data 4992 4992 0 0.0
.data.rel.ro 92312 92312 0 0.0
.dynamic 624 624 0 0.0
.got 5512 5512 0 0.0
.init 27 27 0 0.0
.init_array 1136 1136 0 0.0
.rodata 273141 273141 0 0.0
.text 4891971 4891971 0 0.0
tv-casting-app debug (read only) 9611601 9611601 0 0.0
(read/write) 339232 339232 0 0.0
.bss 156384 156384 0 0.0
.data 2464 2464 0 0.0
.data.rel.ro 173536 173536 0 0.0
.dynamic 624 624 0 0.0
.got 5064 5064 0 0.0
.init 27 27 0 0.0
.init_array 1144 1144 0 0.0
.rodata 363912 363912 0 0.0
.text 8782083 8782083 0 0.0
mbed lock-app-release cy8cproto_062_4343w (read only) 6224 6224 0 0.0
(read/write) 2526192 2526192 0 0.0
.bss 220280 220280 0 0.0
.data 5144 5144 0 0.0
.text 1488876 1488876 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read only) 4 4 0 0.0
(read/write) 1068176 1068176 0 0.0
bss 129457 129457 0 0.0
rodata 105456 105456 0 0.0
text 785640 785640 0 0.0
nrf7002dk_nrf5340_cpuapp (read only) 4 4 0 0.0
(read/write) 1194236 1194236 0 0.0
bss 121667 121667 0 0.0
rodata 139216 139216 0 0.0
text 783016 783016 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read only) 4 4 0 0.0
(read/write) 1040524 1040524 0 0.0
bss 129412 129412 0 0.0
rodata 98892 98892 0 0.0
text 764528 764528 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 (read only) 835800 835800 0 0.0
(read/write) 1751556 1751556 0 0.0
.bss 195068 195068 0 0.0
.data 2472 2472 0 0.0
.text 1545628 1545628 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 (read only) 837848 837848 0 0.0
(read/write) 1706348 1706348 0 0.0
.bss 193020 193020 0 0.0
.data 2472 2472 0 0.0
.text 1502468 1502468 0 0.0
light cy8ckit_062s2_43012 (read only) 844536 844536 0 0.0
(read/write) 1631340 1631340 0 0.0
.bss 186444 186444 0 0.0
.data 2360 2360 0 0.0
.text 1434148 1434148 0 0.0
lock cy8ckit_062s2_43012 (read only) 817416 817416 0 0.0
(read/write) 1658244 1658244 0 0.0
.bss 213540 213540 0 0.0
.data 2384 2384 0 0.0
.text 1433932 1433932 0 0.0
qpg lighting-app qpg6105+debug (read/write) 1116852 1116852 0 0.0
.bss 101280 101280 0 0.0
.data 740 740 0 0.0
.text 629228 629228 0 0.0
lock-app qpg6105+debug (read/write) 1080780 1080780 0 0.0
.bss 97576 97576 0 0.0
.data 784 784 0 0.0
.text 593160 593160 0 0.0
telink air-quality-sensor-app tlsr9528a_retention (read only) 51774 51774 0 0.0
(read/write) 821658 821658 0 0.0
bss 55096 55096 0 0.0
text 613960 613960 0 0.0
all-clusters-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 1087064 1087064 0 0.0
bss 100468 100468 0 0.0
text 767458 767458 0 0.0
all-clusters-minimal-app tlsr9528a (read only) 4 4 0 0.0
(read/write) 1084348 1084348 0 0.0
bss 109828 109828 0 0.0
text 753596 753596 0 0.0
bridge-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 934988 934988 0 0.0
bss 94336 94336 0 0.0
text 647014 647014 0 0.0
contact-sensor-app tlsr9528a_retention (read only) 51774 51774 0 0.0
(read/write) 821894 821894 0 0.0
bss 55140 55140 0 0.0
text 614330 614330 0 0.0
light-switch-app-ota-shell-factory-data tlsr9528a (read only) 4 4 0 0.0
(read/write) 978980 978980 0 0.0
bss 79124 79124 0 0.0
text 694420 694420 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 1093336 1093336 0 0.0
bss 99900 99900 0 0.0
text 769906 769906 0 0.0
lock-app-dfu tlsr9528a (read only) 4 4 0 0.0
(read/write) 965612 965612 0 0.0
bss 97388 97388 0 0.0
text 648096 648096 0 0.0
ota-requestor-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 948664 948664 0 0.0
bss 92444 92444 0 0.0
text 663122 663122 0 0.0
pump-app tlsr9528a (read only) 4 4 0 0.0
(read/write) 880692 880692 0 0.0
bss 69116 69116 0 0.0
text 622340 622340 0 0.0
pump-controller-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 821304 821304 0 0.0
bss 57352 57352 0 0.0
text 589216 589216 0 0.0
shell tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 705600 705600 0 0.0
bss 73588 73588 0 0.0
text 462094 462094 0 0.0
smoke_co_alarm-app tlsr9528a_retention (read only) 51774 51774 0 0.0
(read/write) 823630 823630 0 0.0
bss 55276 55276 0 0.0
text 617074 617074 0 0.0
temperature-measurement-app-mars-ota tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 878397 878397 0 0.0
bss 60828 60828 0 0.0
text 630956 630956 0 0.0
thermostat tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 845676 845676 0 0.0
bss 57648 57648 0 0.0
text 607682 607682 0 0.0
window-covering tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 839952 839952 0 0.0
bss 58000 58000 0 0.0
text 601716 601716 0 0.0

@bzbarsky-apple
Copy link
Contributor Author

Fast-tracking platform-specific fix with platform owner review.

@mergify mergify bot merged commit ab58186 into project-chip:master Dec 22, 2023
57 checks passed
@bzbarsky-apple bzbarsky-apple deleted the restore-missing-functions branch December 22, 2023 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants