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

Fix saveAs handling for nullable values. #14602

Merged
merged 1 commit into from
Feb 2, 2022

Conversation

bzbarsky-apple
Copy link
Contributor

  • test_cluster_placeholder.zapt should never have been checked in (and was identical to test_cluster.zapt).

  • Store the saveAs value as the type we expect to actually consume (this means a boxed value on Darwin, and a Nullable as needed in chip-tool).

  • Fix comparisons to the saveAs value to work right.

Fixes #14502

Problem

See above.

Change overview

See above.

Testing

Examined generated code for the examples from #14502

@github-actions
Copy link

github-actions bot commented Jan 31, 2022

PR #14602: Size comparison from fb256c5 to 6e39508

Full report (16 builds for cyw30739, efr32, k32w, linux, p6, qpg, telink)
platform target config section fb256c5 6e39508 change % change
cyw30739 light cyw930739m2evb_01 (read/write) 575582 575582 0 0.0
.app_xip_area 482804 482804 0 0.0
.bss 75524 75524 0 0.0
.data 596 596 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock-app CYW30739 (read/write) 533602 533602 0 0.0
.app_xip_area 442400 442400 0 0.0
.bss 73988 73988 0 0.0
.data 560 560 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
efr32 lighting-app BRD4161A (read only) 841496 841496 0 0.0
(read/write) 125056 125056 0 0.0
.bss 123160 123160 0 0.0
.data 1892 1892 0 0.0
.text 841488 841488 0 0.0
BRD4161A+rpc (read only) 828856 828856 0 0.0
(read/write) 141712 141712 0 0.0
.bss 139720 139720 0 0.0
.data 1992 1992 0 0.0
.text 828848 828848 0 0.0
window-app BRD4161A (read only) 814108 814108 0 0.0
(read/write) 123684 123684 0 0.0
.bss 121836 121836 0 0.0
.data 1848 1848 0 0.0
.text 814100 814100 0 0.0
k32w light k32w061+release (read/write) 660276 660276 0 0.0
.bss 75212 75212 0 0.0
.data 1852 1852 0 0.0
.text 577412 577412 0 0.0
lock k32w061+release (read/write) 661352 661352 0 0.0
.bss 75532 75532 0 0.0
.data 1892 1892 0 0.0
.text 578128 578128 0 0.0
linux chip-tool-ipv6only arm64 (read only) 6985972 6985972 0 0.0
(read/write) 288945 288945 0 0.0
.bss 54593 54593 0 0.0
.data 1128 1128 0 0.0
.data.rel.ro 184384 184384 0 0.0
.dynamic 560 560 0 0.0
.got 45072 45072 0 0.0
.init 24 24 0 0.0
.init_array 184 184 0 0.0
.rodata 387068 387068 0 0.0
.text 6002436 6002436 0 0.0
thermostat-no-ble arm64 (read only) 2079596 2079596 0 0.0
(read/write) 148433 148433 0 0.0
.bss 66177 66177 0 0.0
.data 952 952 0 0.0
.data.rel.ro 74200 74200 0 0.0
.dynamic 560 560 0 0.0
.got 4136 4136 0 0.0
.init 24 24 0 0.0
.init_array 336 336 0 0.0
.rodata 130252 130252 0 0.0
.text 1732144 1732144 0 0.0
p6 all-clusters-app default (read/write) 2442616 2442616 0 0.0
.bss 116028 116028 0 0.0
.data 2576 2576 0 0.0
.text 1400880 1400880 0 0.0
light-app default (read/write) 2338192 2338192 0 0.0
.bss 103348 103348 0 0.0
.data 2400 2400 0 0.0
.text 1296456 1296456 0 0.0
lock-app default (read/write) 2303664 2303664 0 0.0
.bss 103068 103068 0 0.0
.data 2360 2360 0 0.0
.text 1261928 1261928 0 0.0
qpg lighting-app qpg6105+debug (read only) 569648 569648 0 0.0
(read/write) 146940 146940 0 0.0
.bss 87504 87504 0 0.0
.data 1056 1056 0 0.0
.text 564328 564328 0 0.0
lock-app qpg6105+debug (read only) 515764 515764 0 0.0
(read/write) 146940 146940 0 0.0
.bss 86944 86944 0 0.0
.data 992 992 0 0.0
.text 510444 510444 0 0.0
persistent-storage-app qpg6105+debug (read only) 107140 107140 0 0.0
(read/write) 146940 146940 0 0.0
.bss 38504 38504 0 0.0
.data 288 288 0 0.0
.text 101820 101820 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 843362 843362 0 0.0
bss 85552 85552 0 0.0
noinit 37160 37160 0 0.0
text 591236 591236 0 0.0

* test_cluster_placeholder.zapt should never have been checked in (and was identical to test_cluster.zapt).

* Store the saveAs value as the type we expect to actually consume (this means a boxed value on Darwin, and a Nullable as needed in chip-tool).

* Fix comparisons to the saveAs value to work right.
@github-actions
Copy link

github-actions bot commented Jan 31, 2022

PR #14602: Size comparison from fb256c5 to 8a92b12

Full report (33 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section fb256c5 8a92b12 change % change
cyw30739 light cyw930739m2evb_01 (read/write) 575582 575582 0 0.0
.app_xip_area 482804 482804 0 0.0
.bss 75524 75524 0 0.0
.data 596 596 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock-app CYW30739 (read/write) 533602 533602 0 0.0
.app_xip_area 442400 442400 0 0.0
.bss 73988 73988 0 0.0
.data 560 560 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
efr32 lighting-app BRD4161A (read only) 841496 841496 0 0.0
(read/write) 125056 125056 0 0.0
.bss 123160 123160 0 0.0
.data 1892 1892 0 0.0
.text 841488 841488 0 0.0
BRD4161A+rpc (read only) 828856 828856 0 0.0
(read/write) 141712 141712 0 0.0
.bss 139720 139720 0 0.0
.data 1992 1992 0 0.0
.text 828848 828848 0 0.0
window-app BRD4161A (read only) 814108 814108 0 0.0
(read/write) 123684 123684 0 0.0
.bss 121836 121836 0 0.0
.data 1848 1848 0 0.0
.text 814100 814100 0 0.0
esp32 all-clusters-app c3devkit (read only) 932520 932520 0 0.0
(read/write) 1397882 1397882 0 0.0
.dram0.bss 68968 68968 0 0.0
.dram0.data 14268 14268 0 0.0
.flash.rodata 195744 195744 0 0.0
.flash.text 932520 932520 0 0.0
.iram0.text 62056 62056 0 0.0
m5stack (read only) 980491 980491 0 0.0
(read/write) 462248 462248 0 0.0
.dram0.bss 73728 73728 0 0.0
.dram0.data 34024 34024 0 0.0
.flash.rodata 222368 222368 0 0.0
.flash.text 975107 975107 0 0.0
.iram0.text 123399 123399 0 0.0
k32w light k32w061+release (read/write) 660276 660276 0 0.0
.bss 75212 75212 0 0.0
.data 1852 1852 0 0.0
.text 577412 577412 0 0.0
lock k32w061+release (read/write) 661352 661352 0 0.0
.bss 75532 75532 0 0.0
.data 1892 1892 0 0.0
.text 578128 578128 0 0.0
linux chip-tool-ipv6only arm64 (read only) 6985972 6985972 0 0.0
(read/write) 288945 288945 0 0.0
.bss 54593 54593 0 0.0
.data 1128 1128 0 0.0
.data.rel.ro 184384 184384 0 0.0
.dynamic 560 560 0 0.0
.got 45072 45072 0 0.0
.init 24 24 0 0.0
.init_array 184 184 0 0.0
.rodata 387068 387068 0 0.0
.text 6002436 6002436 0 0.0
thermostat-no-ble arm64 (read only) 2079596 2079596 0 0.0
(read/write) 148433 148433 0 0.0
.bss 66177 66177 0 0.0
.data 952 952 0 0.0
.data.rel.ro 74200 74200 0 0.0
.dynamic 560 560 0 0.0
.got 4136 4136 0 0.0
.init 24 24 0 0.0
.init_array 336 336 0 0.0
.rodata 130252 130252 0 0.0
.text 1732144 1732144 0 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2382064 2382064 0 0.0
.bss 187884 187884 0 0.0
.data 5288 5288 0 0.0
.text 1344664 1344664 0 0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2336632 2336632 0 0.0
.bss 178160 178160 0 0.0
.data 5568 5568 0 0.0
.text 1299232 1299232 0 0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2300736 2300736 0 0.0
.bss 178040 178040 0 0.0
.data 5544 5544 0 0.0
.text 1263336 1263336 0 0.0
pigweed-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 1139712 1139712 0 0.0
.bss 11756 11756 0 0.0
.data 4368 4368 0 0.0
.text 103096 103096 0 0.0
shell CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2291348 2291348 0 0.0
.bss 175316 175316 0 0.0
.data 5368 5368 0 0.0
.text 1253920 1253920 0 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 978979 978979 0 0.0
bss 118528 118528 0 0.0
rodata 115464 115464 0 0.0
text 667216 667216 0 0.0
nrf52840dk_nrf52840+rpc (read/write) 964555 964555 0 0.0
bss 115572 115572 0 0.0
rodata 106936 106936 0 0.0
text 663660 663660 0 0.0
nrf52840dongle_nrf52840 (read/write) 995063 995063 0 0.0
bss 119700 119700 0 0.0
rodata 114296 114296 0 0.0
text 672608 672608 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 888178 888178 0 0.0
bss 115316 115316 0 0.0
rodata 108740 108740 0 0.0
text 583400 583400 0 0.0
lock-app nrf52840dk_nrf52840 (read/write) 911623 911623 0 0.0
bss 116888 116888 0 0.0
rodata 104100 104100 0 0.0
text 613248 613248 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 821670 821670 0 0.0
bss 113704 113704 0 0.0
rodata 97304 97304 0 0.0
text 530212 530212 0 0.0
pigweed-app nrf52840dk_nrf52840 (read/write) 541779 541779 0 0.0
bss 52588 52588 0 0.0
rodata 50048 50048 0 0.0
text 376940 376940 0 0.0
pump-app nrf52840dk_nrf52840 (read/write) 914495 914495 0 0.0
bss 116644 116644 0 0.0
rodata 104612 104612 0 0.0
text 615772 615772 0 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 909671 909671 0 0.0
bss 116652 116652 0 0.0
rodata 103716 103716 0 0.0
text 611820 611820 0 0.0
shell nrf52840dk_nrf52840 (read/write) 798379 798379 0 0.0
bss 109776 109776 0 0.0
rodata 78352 78352 0 0.0
text 533752 533752 0 0.0
p6 all-clusters-app default (read/write) 2442616 2442616 0 0.0
.bss 116028 116028 0 0.0
.data 2576 2576 0 0.0
.text 1400880 1400880 0 0.0
light-app default (read/write) 2338192 2338192 0 0.0
.bss 103348 103348 0 0.0
.data 2400 2400 0 0.0
.text 1296456 1296456 0 0.0
lock-app default (read/write) 2303664 2303664 0 0.0
.bss 103068 103068 0 0.0
.data 2360 2360 0 0.0
.text 1261928 1261928 0 0.0
qpg lighting-app qpg6105+debug (read only) 569648 569648 0 0.0
(read/write) 146940 146940 0 0.0
.bss 87504 87504 0 0.0
.data 1056 1056 0 0.0
.text 564328 564328 0 0.0
lock-app qpg6105+debug (read only) 515764 515764 0 0.0
(read/write) 146940 146940 0 0.0
.bss 86944 86944 0 0.0
.data 992 992 0 0.0
.text 510444 510444 0 0.0
persistent-storage-app qpg6105+debug (read only) 107140 107140 0 0.0
(read/write) 146940 146940 0 0.0
.bss 38504 38504 0 0.0
.data 288 288 0 0.0
.text 101820 101820 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 843362 843362 0 0.0
bss 85552 85552 0 0.0
noinit 37160 37160 0 0.0
text 591236 591236 0 0.0

@andy31415 andy31415 merged commit b8cb560 into project-chip:master Feb 2, 2022
@bzbarsky-apple bzbarsky-apple deleted the fix-nullable-SaveAs branch February 2, 2022 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

YAML: Cannot use SaveAs to compare 2 nullable of the same type
4 participants