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

Add support for null in the notValue constraint. #13107

Merged
merged 1 commit into from
Dec 17, 2021

Conversation

bzbarsky-apple
Copy link
Contributor

Now (for a nullable value) you can write:

notValue: null

in the constraints in yaml and it will do what one expects.

Problem

See above.

Change overview

See above.

Testing

Checked that the generated code in the tests has the right checks.

@github-actions
Copy link

github-actions bot commented Dec 17, 2021

PR #13107: Size comparison from 9338395 to c1c0e29

Increases (1 build for linux)
platform target config section 9338395 c1c0e29 change % change
linux chip-tool-ipv6only arm64 (read only) 6947164 6947916 752 0.0
(read/write) 323953 323969 16 0.0
.got 56480 56496 16 0.0
.rodata 380948 381044 96 0.0
.text 5877684 5878292 608 0.0
Full report (31 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section 9338395 c1c0e29 change % change
efr32 lighting-app BRD4161A (read only) 829904 829904 0 0.0
(read/write) 127352 127352 0 0.0
.bss 125472 125472 0 0.0
.data 1876 1876 0 0.0
.text 829896 829896 0 0.0
BRD4161A+rpc (read only) 817532 817532 0 0.0
(read/write) 144016 144016 0 0.0
.bss 142040 142040 0 0.0
.data 1976 1976 0 0.0
.text 817524 817524 0 0.0
window-app BRD4161A (read only) 803280 803280 0 0.0
(read/write) 126288 126288 0 0.0
.bss 124456 124456 0 0.0
.data 1832 1832 0 0.0
.text 803272 803272 0 0.0
esp32 all-clusters-app c3devkit (read only) 877496 877496 0 0.0
(read/write) 1313042 1313042 0 0.0
.dram0.bss 69784 69784 0 0.0
.dram0.data 14220 14220 0 0.0
.flash.rodata 175976 175976 0 0.0
.flash.text 877496 877496 0 0.0
.iram0.text 62254 62254 0 0.0
m5stack (read only) 938355 938355 0 0.0
(read/write) 442144 442144 0 0.0
.dram0.bss 74280 74280 0 0.0
.dram0.data 34056 34056 0 0.0
.flash.rodata 202800 202800 0 0.0
.flash.text 932971 932971 0 0.0
.iram0.text 122671 122671 0 0.0
k32w light k32w061+release (read/write) 648664 648664 0 0.0
.bss 76480 76480 0 0.0
.data 1904 1904 0 0.0
.text 564480 564480 0 0.0
lock k32w061+release (read/write) 633380 633380 0 0.0
.bss 76200 76200 0 0.0
.data 1860 1860 0 0.0
.text 549520 549520 0 0.0
linux chip-tool-ipv6only arm64 (read only) 6947164 6947916 752 0.0
(read/write) 323953 323969 16 0.0
.bss 54577 54577 0 0.0
.data 1096 1096 0 0.0
.data.rel.ro 208096 208096 0 0.0
.dynamic 560 560 0 0.0
.got 56480 56496 16 0.0
.init 24 24 0 0.0
.init_array 168 168 0 0.0
.rodata 380948 381044 96 0.0
.text 5877684 5878292 608 0.0
thermostat-no-ble arm64 (read only) 1996756 1996756 0 0.0
(read/write) 143953 143953 0 0.0
.bss 64321 64321 0 0.0
.data 880 880 0 0.0
.data.rel.ro 72024 72024 0 0.0
.dynamic 560 560 0 0.0
.got 3840 3840 0 0.0
.init 24 24 0 0.0
.init_array 288 288 0 0.0
.rodata 128196 128196 0 0.0
.text 1657072 1657072 0 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2334424 2334424 0 0.0
.bss 189068 189068 0 0.0
.data 5264 5264 0 0.0
.text 1297000 1297000 0 0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2329000 2329000 0 0.0
.bss 180896 180896 0 0.0
.data 5544 5544 0 0.0
.text 1291600 1291600 0 0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2302032 2302032 0 0.0
.bss 179944 179944 0 0.0
.data 5536 5536 0 0.0
.text 1264632 1264632 0 0.0
pigweed-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 1140008 1140008 0 0.0
.bss 11756 11756 0 0.0
.data 4368 4368 0 0.0
.text 103392 103392 0 0.0
shell CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2053688 2053688 0 0.0
.bss 156972 156972 0 0.0
.data 4864 4864 0 0.0
.text 1016288 1016288 0 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 935915 935915 0 0.0
bss 118400 118400 0 0.0
rodata 108120 108120 0 0.0
text 631844 631844 0 0.0
nrf52840dk_nrf52840+rpc (read/write) 922315 922315 0 0.0
bss 115444 115444 0 0.0
rodata 101536 101536 0 0.0
text 627156 627156 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 859678 859678 0 0.0
bss 116684 116684 0 0.0
rodata 103044 103044 0 0.0
text 559284 559284 0 0.0
lock-app nrf52840dk_nrf52840 (read/write) 908059 908059 0 0.0
bss 117588 117588 0 0.0
rodata 103424 103424 0 0.0
text 609668 609668 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 831974 831974 0 0.0
bss 115900 115900 0 0.0
rodata 98388 98388 0 0.0
text 537152 537152 0 0.0
pigweed-app nrf52840dk_nrf52840 (read/write) 542351 542351 0 0.0
bss 52588 52588 0 0.0
rodata 50668 50668 0 0.0
text 376892 376892 0 0.0
pump-app nrf52840dk_nrf52840 (read/write) 912939 912939 0 0.0
bss 117496 117496 0 0.0
rodata 104768 104768 0 0.0
text 613220 613220 0 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 906139 906139 0 0.0
bss 117376 117376 0 0.0
rodata 102896 102896 0 0.0
text 608416 608416 0 0.0
shell nrf52840dk_nrf52840 (read/write) 796079 796079 0 0.0
bss 109464 109464 0 0.0
rodata 78096 78096 0 0.0
text 532048 532048 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 708710 708710 0 0.0
bss 107352 107352 0 0.0
rodata 72396 72396 0 0.0
text 449544 449544 0 0.0
p6 all-clusters-app default (read/write) 2385072 2385072 0 0.0
.bss 117260 117260 0 0.0
.data 2544 2544 0 0.0
.text 1343336 1343336 0 0.0
light-app default (read/write) 2324456 2324456 0 0.0
.bss 106152 106152 0 0.0
.data 2384 2384 0 0.0
.text 1282720 1282720 0 0.0
lock-app default (read/write) 2296648 2296648 0 0.0
.bss 105032 105032 0 0.0
.data 2336 2336 0 0.0
.text 1254912 1254912 0 0.0
qpg lighting-app qpg6105+debug (read only) 532172 532172 0 0.0
(read/write) 146936 146936 0 0.0
.bss 86816 86816 0 0.0
.data 1004 1004 0 0.0
.text 526852 526852 0 0.0
lock-app qpg6105+debug (read only) 503836 503836 0 0.0
(read/write) 146940 146940 0 0.0
.bss 85952 85952 0 0.0
.data 952 952 0 0.0
.text 498516 498516 0 0.0
persistent-storage-app qpg6105+debug (read only) 106448 106448 0 0.0
(read/write) 146938 146938 0 0.0
.bss 36146 36146 0 0.0
.data 288 288 0 0.0
.text 101128 101128 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 830638 830638 0 0.0
bss 87040 87040 0 0.0
noinit 37160 37160 0 0.0
text 578832 578832 0 0.0

Now (for a nullable value) you can write:

    notValue: null

in the constraints in yaml and it will do what one expects.
@github-actions
Copy link

github-actions bot commented Dec 17, 2021

PR #13107: Size comparison from a9b9fca to d997ae3

Increases (1 build for linux)
platform target config section a9b9fca d997ae3 change % change
linux chip-tool-ipv6only arm64 (read only) 6951772 6952524 752 0.0
(read/write) 324401 324417 16 0.0
.got 56456 56472 16 0.0
.rodata 382580 382676 96 0.0
.text 5879780 5880388 608 0.0
Full report (31 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section a9b9fca d997ae3 change % change
efr32 lighting-app BRD4161A (read only) 829904 829904 0 0.0
(read/write) 127352 127352 0 0.0
.bss 125472 125472 0 0.0
.data 1876 1876 0 0.0
.text 829896 829896 0 0.0
BRD4161A+rpc (read only) 817532 817532 0 0.0
(read/write) 144016 144016 0 0.0
.bss 142040 142040 0 0.0
.data 1976 1976 0 0.0
.text 817524 817524 0 0.0
window-app BRD4161A (read only) 803280 803280 0 0.0
(read/write) 126288 126288 0 0.0
.bss 124456 124456 0 0.0
.data 1832 1832 0 0.0
.text 803272 803272 0 0.0
esp32 all-clusters-app c3devkit (read only) 877496 877496 0 0.0
(read/write) 1313042 1313042 0 0.0
.dram0.bss 69784 69784 0 0.0
.dram0.data 14220 14220 0 0.0
.flash.rodata 175976 175976 0 0.0
.flash.text 877496 877496 0 0.0
.iram0.text 62254 62254 0 0.0
m5stack (read only) 938355 938355 0 0.0
(read/write) 442144 442144 0 0.0
.dram0.bss 74280 74280 0 0.0
.dram0.data 34056 34056 0 0.0
.flash.rodata 202800 202800 0 0.0
.flash.text 932971 932971 0 0.0
.iram0.text 122671 122671 0 0.0
k32w light k32w061+release (read/write) 648664 648664 0 0.0
.bss 76480 76480 0 0.0
.data 1904 1904 0 0.0
.text 564480 564480 0 0.0
lock k32w061+release (read/write) 633380 633380 0 0.0
.bss 76200 76200 0 0.0
.data 1860 1860 0 0.0
.text 549520 549520 0 0.0
linux chip-tool-ipv6only arm64 (read only) 6951772 6952524 752 0.0
(read/write) 324401 324417 16 0.0
.bss 54577 54577 0 0.0
.data 1096 1096 0 0.0
.data.rel.ro 208576 208576 0 0.0
.dynamic 560 560 0 0.0
.got 56456 56472 16 0.0
.init 24 24 0 0.0
.init_array 168 168 0 0.0
.rodata 382580 382676 96 0.0
.text 5879780 5880388 608 0.0
thermostat-no-ble arm64 (read only) 1996756 1996756 0 0.0
(read/write) 143953 143953 0 0.0
.bss 64321 64321 0 0.0
.data 880 880 0 0.0
.data.rel.ro 72024 72024 0 0.0
.dynamic 560 560 0 0.0
.got 3840 3840 0 0.0
.init 24 24 0 0.0
.init_array 288 288 0 0.0
.rodata 128196 128196 0 0.0
.text 1657072 1657072 0 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2334424 2334424 0 0.0
.bss 189068 189068 0 0.0
.data 5264 5264 0 0.0
.text 1297000 1297000 0 0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2329000 2329000 0 0.0
.bss 180896 180896 0 0.0
.data 5544 5544 0 0.0
.text 1291600 1291600 0 0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2302032 2302032 0 0.0
.bss 179944 179944 0 0.0
.data 5536 5536 0 0.0
.text 1264632 1264632 0 0.0
pigweed-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 1140008 1140008 0 0.0
.bss 11756 11756 0 0.0
.data 4368 4368 0 0.0
.text 103392 103392 0 0.0
shell CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2053688 2053688 0 0.0
.bss 156972 156972 0 0.0
.data 4864 4864 0 0.0
.text 1016288 1016288 0 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 935915 935915 0 0.0
bss 118400 118400 0 0.0
rodata 108120 108120 0 0.0
text 631844 631844 0 0.0
nrf52840dk_nrf52840+rpc (read/write) 922315 922315 0 0.0
bss 115444 115444 0 0.0
rodata 101536 101536 0 0.0
text 627156 627156 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 859678 859678 0 0.0
bss 116684 116684 0 0.0
rodata 103044 103044 0 0.0
text 559284 559284 0 0.0
lock-app nrf52840dk_nrf52840 (read/write) 908059 908059 0 0.0
bss 117588 117588 0 0.0
rodata 103424 103424 0 0.0
text 609668 609668 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 831974 831974 0 0.0
bss 115900 115900 0 0.0
rodata 98388 98388 0 0.0
text 537152 537152 0 0.0
pigweed-app nrf52840dk_nrf52840 (read/write) 542351 542351 0 0.0
bss 52588 52588 0 0.0
rodata 50668 50668 0 0.0
text 376892 376892 0 0.0
pump-app nrf52840dk_nrf52840 (read/write) 909355 909355 0 0.0
bss 117348 117348 0 0.0
rodata 103640 103640 0 0.0
text 610908 610908 0 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 906139 906139 0 0.0
bss 117376 117376 0 0.0
rodata 102896 102896 0 0.0
text 608416 608416 0 0.0
shell nrf52840dk_nrf52840 (read/write) 796079 796079 0 0.0
bss 109464 109464 0 0.0
rodata 78096 78096 0 0.0
text 532048 532048 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 708710 708710 0 0.0
bss 107352 107352 0 0.0
rodata 72396 72396 0 0.0
text 449544 449544 0 0.0
p6 all-clusters-app default (read/write) 2385072 2385072 0 0.0
.bss 117260 117260 0 0.0
.data 2544 2544 0 0.0
.text 1343336 1343336 0 0.0
light-app default (read/write) 2324456 2324456 0 0.0
.bss 106152 106152 0 0.0
.data 2384 2384 0 0.0
.text 1282720 1282720 0 0.0
lock-app default (read/write) 2296648 2296648 0 0.0
.bss 105032 105032 0 0.0
.data 2336 2336 0 0.0
.text 1254912 1254912 0 0.0
qpg lighting-app qpg6105+debug (read only) 532172 532172 0 0.0
(read/write) 146936 146936 0 0.0
.bss 86816 86816 0 0.0
.data 1004 1004 0 0.0
.text 526852 526852 0 0.0
lock-app qpg6105+debug (read only) 503836 503836 0 0.0
(read/write) 146940 146940 0 0.0
.bss 85952 85952 0 0.0
.data 952 952 0 0.0
.text 498516 498516 0 0.0
persistent-storage-app qpg6105+debug (read only) 106448 106448 0 0.0
(read/write) 146938 146938 0 0.0
.bss 36146 36146 0 0.0
.data 288 288 0 0.0
.text 101128 101128 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 830638 830638 0 0.0
bss 87040 87040 0 0.0
noinit 37160 37160 0 0.0
text 578832 578832 0 0.0

@andy31415 andy31415 merged commit 09784c5 into project-chip:master Dec 17, 2021
@bzbarsky-apple bzbarsky-apple deleted the notvalue-null branch December 17, 2021 16:48
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.

2 participants