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 YAML tests handling of lists of structs that contain lists. #13142

Merged

Conversation

bzbarsky-apple
Copy link
Contributor

The main issue was that comparing to such a value failed because we
ended up with "iter" variables for both levels of list nesting that
name-collided.

The fix for that was to add "depth" disabmbiguation like we have in
the Darwin codegen already.

While adding a test for this, a few other issues were encountered:

  1. The "commandValue" partial, when dealing with an optional or
    nullable struct, would do an Emplace() or SetNonNull() for every
    single member, which would wipe out earlier members. The fix for that
    is to do them once, and then use .Value() for the recursive partial
    invocation.

  2. When sending a struct with optional fields, we were requiring the
    YAML to specify values for all the fields. Added
    if_include_struct_item_value to allow the YAML to not include values
    for such fields.

  3. The YAML for checking struct values expected struct field names in
    the YAML to be lowerCamelCase instead of matching the XML case. The
    code for sending struct values expected struct field names to match
    the XML case. This inconsistency was very confusing, and this PR
    makes both expect the XML case. I verified that the only codegen
    changes due to this were in the TestModeSelectCluster and
    Test_TC_DM_2_2 tests. The latter had actually had its struct fields
    ignored because they were the "wrong" case.... Both tests fixed.

Problem

See above.

Change overview

See above.

Testing

New tests pass. Manually examined codegen changes for tests for sanity.

@github-actions
Copy link

github-actions bot commented Dec 18, 2021

PR #13142: Size comparison from d6aac1f to 4138f0e

Increases above 0.2%:

platform target config section d6aac1f7 4138f0e change % change
esp32 all-clusters-app c3devkit .dram0.bss 69296 69552 256 0.4
m5stack .dram0.bss 73792 74048 256 0.3
linux chip-tool-ipv6only arm64 (read only) 6979164 6998028 18864 0.3
.text 5903540 5921412 17872 0.3
Increases (5 builds for esp32, linux, mbed, p6)
platform target config section d6aac1f7 4138f0e change % change
esp32 all-clusters-app c3devkit (read only) 881266 882542 1276 0.1
(read/write) 1312402 1312658 256 0.0
.dram0.bss 69296 69552 256 0.4
.flash.text 881266 882542 1276 0.1
m5stack (read only) 941919 943067 1148 0.1
(read/write) 441516 441772 256 0.1
.dram0.bss 73792 74048 256 0.3
.flash.text 936535 937683 1148 0.1
linux chip-tool-ipv6only arm64 (read only) 6979164 6998028 18864 0.3
(read/write) 325633 325697 64 0.0
.got 56536 56608 72 0.1
.rodata 383732 384516 784 0.2
.text 5903540 5921412 17872 0.3
mbed all-clusters-app CY8CPROTO_062_4343W+release (read/write) 2337920 2338880 960 0.0
.bss 188580 188836 256 0.1
.text 1300496 1301456 960 0.1
p6 all-clusters-app default (read/write) 2390040 2391336 1296 0.1
.bss 116780 117036 256 0.2
.text 1348304 1349600 1296 0.1
Full report (31 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section d6aac1f7 4138f0e change % change
efr32 lighting-app BRD4161A (read only) 830584 830584 0 0.0
(read/write) 127360 127360 0 0.0
.bss 125480 125480 0 0.0
.data 1876 1876 0 0.0
.text 830576 830576 0 0.0
BRD4161A+rpc (read only) 818212 818212 0 0.0
(read/write) 144024 144024 0 0.0
.bss 142048 142048 0 0.0
.data 1976 1976 0 0.0
.text 818204 818204 0 0.0
window-app BRD4161A (read only) 803960 803960 0 0.0
(read/write) 126296 126296 0 0.0
.bss 124464 124464 0 0.0
.data 1832 1832 0 0.0
.text 803952 803952 0 0.0
esp32 all-clusters-app c3devkit (read only) 881266 882542 1276 0.1
(read/write) 1312402 1312658 256 0.0
.dram0.bss 69296 69552 256 0.4
.dram0.data 14220 14220 0 0.0
.flash.rodata 175832 175832 0 0.0
.flash.text 881266 882542 1276 0.1
.iram0.text 62254 62254 0 0.0
m5stack (read only) 941919 943067 1148 0.1
(read/write) 441516 441772 256 0.1
.dram0.bss 73792 74048 256 0.3
.dram0.data 34056 34056 0 0.0
.flash.rodata 202660 202660 0 0.0
.flash.text 936535 937683 1148 0.1
.iram0.text 122671 122671 0 0.0
k32w light k32w061+release (read/write) 648852 648852 0 0.0
.bss 76488 76488 0 0.0
.data 1904 1904 0 0.0
.text 564660 564660 0 0.0
lock k32w061+release (read/write) 633568 633568 0 0.0
.bss 76208 76208 0 0.0
.data 1860 1860 0 0.0
.text 549700 549700 0 0.0
linux chip-tool-ipv6only arm64 (read only) 6979164 6998028 18864 0.3
(read/write) 325633 325697 64 0.0
.bss 54593 54593 0 0.0
.data 1096 1096 0 0.0
.data.rel.ro 209704 209704 0 0.0
.dynamic 560 560 0 0.0
.got 56536 56608 72 0.1
.init 24 24 0 0.0
.init_array 168 168 0 0.0
.rodata 383732 384516 784 0.2
.text 5903540 5921412 17872 0.3
thermostat-no-ble arm64 (read only) 2006052 2006052 0 0.0
(read/write) 144065 144065 0 0.0
.bss 64353 64353 0 0.0
.data 880 880 0 0.0
.data.rel.ro 72088 72088 0 0.0
.dynamic 560 560 0 0.0
.got 3840 3840 0 0.0
.init 24 24 0 0.0
.init_array 296 296 0 0.0
.rodata 128356 128356 0 0.0
.text 1666032 1666032 0 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2337920 2338880 960 0.0
.bss 188580 188836 256 0.1
.data 5264 5264 0 0.0
.text 1300496 1301456 960 0.1
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2330760 2330760 0 0.0
.bss 180920 180920 0 0.0
.data 5552 5552 0 0.0
.text 1293360 1293360 0 0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2303792 2303792 0 0.0
.bss 179968 179968 0 0.0
.data 5544 5544 0 0.0
.text 1266392 1266392 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) 936111 936111 0 0.0
bss 118408 118408 0 0.0
rodata 108124 108124 0 0.0
text 632008 632008 0 0.0
nrf52840dk_nrf52840+rpc (read/write) 922479 922479 0 0.0
bss 115452 115452 0 0.0
rodata 101540 101540 0 0.0
text 627320 627320 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 859842 859842 0 0.0
bss 116692 116692 0 0.0
rodata 103048 103048 0 0.0
text 559452 559452 0 0.0
lock-app nrf52840dk_nrf52840 (read/write) 908223 908223 0 0.0
bss 117596 117596 0 0.0
rodata 103428 103428 0 0.0
text 609836 609836 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 832186 832186 0 0.0
bss 115908 115908 0 0.0
rodata 98392 98392 0 0.0
text 537316 537316 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) 909519 909519 0 0.0
bss 117356 117356 0 0.0
rodata 103644 103644 0 0.0
text 611072 611072 0 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 906335 906335 0 0.0
bss 117384 117384 0 0.0
rodata 102900 102900 0 0.0
text 608584 608584 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) 2390040 2391336 1296 0.1
.bss 116780 117036 256 0.2
.data 2544 2544 0 0.0
.text 1348304 1349600 1296 0.1
light-app default (read/write) 2325120 2325120 0 0.0
.bss 106160 106160 0 0.0
.data 2384 2384 0 0.0
.text 1283384 1283384 0 0.0
lock-app default (read/write) 2297328 2297328 0 0.0
.bss 105040 105040 0 0.0
.data 2336 2336 0 0.0
.text 1255592 1255592 0 0.0
qpg lighting-app qpg6105+debug (read only) 532352 532352 0 0.0
(read/write) 146936 146936 0 0.0
.bss 86824 86824 0 0.0
.data 1004 1004 0 0.0
.text 527032 527032 0 0.0
lock-app qpg6105+debug (read only) 504016 504016 0 0.0
(read/write) 146940 146940 0 0.0
.bss 85960 85960 0 0.0
.data 952 952 0 0.0
.text 498696 498696 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) 832370 832370 0 0.0
bss 87064 87064 0 0.0
noinit 37160 37160 0 0.0
text 580500 580500 0 0.0

@stale
Copy link

stale bot commented Dec 25, 2021

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale Stale issue or PR label Dec 25, 2021
@bzbarsky-apple bzbarsky-apple removed the stale Stale issue or PR label Dec 31, 2021
Copy link
Contributor

@vivien-apple vivien-apple left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r+ with some nits.

@github-actions
Copy link

github-actions bot commented Jan 6, 2022

PR #13142: Size comparison from 46541fb to 50595f2

Increases above 0.2%:

platform target config section 46541fb 50595f2 change % change
linux chip-tool-ipv6only arm64 (read only) 7011468 7030604 19136 0.3
.text 5936084 5954212 18128 0.3
p6 all-clusters-app default .bss 116748 117004 256 0.2
Increases (2 builds for linux, p6)
platform target config section 46541fb 50595f2 change % change
linux chip-tool-ipv6only arm64 (read only) 7011468 7030604 19136 0.3
(read/write) 324849 324913 64 0.0
.got 56888 56960 72 0.1
.rodata 383108 383908 800 0.2
.text 5936084 5954212 18128 0.3
p6 all-clusters-app default (read/write) 2401288 2402584 1296 0.1
.bss 116748 117004 256 0.2
.text 1359552 1360848 1296 0.1
Full report (14 builds for efr32, k32w, linux, p6, qpg, telink)
platform target config section 46541fb 50595f2 change % change
efr32 lighting-app BRD4161A (read only) 829396 829396 0 0.0
(read/write) 127068 127068 0 0.0
.bss 125192 125192 0 0.0
.data 1876 1876 0 0.0
.text 829388 829388 0 0.0
BRD4161A+rpc (read only) 816576 816576 0 0.0
(read/write) 143736 143736 0 0.0
.bss 141760 141760 0 0.0
.data 1976 1976 0 0.0
.text 816568 816568 0 0.0
window-app BRD4161A (read only) 802844 802844 0 0.0
(read/write) 126008 126008 0 0.0
.bss 124176 124176 0 0.0
.data 1832 1832 0 0.0
.text 802836 802836 0 0.0
k32w light k32w061+release (read/write) 648472 648472 0 0.0
.bss 76216 76216 0 0.0
.data 1904 1904 0 0.0
.text 564552 564552 0 0.0
lock k32w061+release (read/write) 633296 633296 0 0.0
.bss 75928 75928 0 0.0
.data 1860 1860 0 0.0
.text 549708 549708 0 0.0
linux chip-tool-ipv6only arm64 (read only) 7011468 7030604 19136 0.3
(read/write) 324849 324913 64 0.0
.bss 54209 54209 0 0.0
.data 1096 1096 0 0.0
.data.rel.ro 208968 208968 0 0.0
.dynamic 560 560 0 0.0
.got 56888 56960 72 0.1
.init 24 24 0 0.0
.init_array 168 168 0 0.0
.rodata 383108 383908 800 0.2
.text 5936084 5954212 18128 0.3
thermostat-no-ble arm64 (read only) 2024348 2024348 0 0.0
(read/write) 144049 144049 0 0.0
.bss 64001 64001 0 0.0
.data 880 880 0 0.0
.data.rel.ro 72296 72296 0 0.0
.dynamic 560 560 0 0.0
.got 3936 3936 0 0.0
.init 24 24 0 0.0
.init_array 296 296 0 0.0
.rodata 128524 128524 0 0.0
.text 1683152 1683152 0 0.0
p6 all-clusters-app default (read/write) 2401288 2402584 1296 0.1
.bss 116748 117004 256 0.2
.data 2592 2592 0 0.0
.text 1359552 1360848 1296 0.1
light-app default (read/write) 2324568 2324568 0 0.0
.bss 105872 105872 0 0.0
.data 2384 2384 0 0.0
.text 1282832 1282832 0 0.0
lock-app default (read/write) 2296768 2296768 0 0.0
.bss 104752 104752 0 0.0
.data 2336 2336 0 0.0
.text 1255032 1255032 0 0.0
qpg lighting-app qpg6105+debug (read only) 531664 531664 0 0.0
(read/write) 146936 146936 0 0.0
.bss 86672 86672 0 0.0
.data 1004 1004 0 0.0
.text 526344 526344 0 0.0
lock-app qpg6105+debug (read only) 503444 503444 0 0.0
(read/write) 146940 146940 0 0.0
.bss 85808 85808 0 0.0
.data 952 952 0 0.0
.text 498124 498124 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) 832242 832242 0 0.0
bss 86856 86856 0 0.0
noinit 37160 37160 0 0.0
text 580682 580682 0 0.0

The main issue was that comparing to such a value failed because we
ended up with "iter" variables for both levels of list nesting that
name-collided.

The fix for that was to add "depth" disabmbiguation like we have in
the Darwin codegen already.

While adding a test for this, a few other issues were encountered:

1) The "commandValue" partial, when dealing with an optional or
nullable struct, would do an Emplace() or SetNonNull() for every
single member, which would wipe out earlier members.  The fix for that
is to do them once, and then use .Value() for the recursive partial
invocation.

2) When sending a struct with optional fields, we were requiring the
YAML to specify values for all the fields.  Added
if_include_struct_item_value to allow the YAML to not include values
for such fields.

3) The YAML for checking struct values expected struct field names in
the YAML to be lowerCamelCase instead of matching the XML case.  The
code for sending struct values expected struct field names to match
the XML case.  This inconsistency was very confusing, and this PR
makes both expect the XML case.  I verified that the only codegen
changes due to this were in the TestModeSelectCluster and
Test_TC_DM_2_2 tests.  The latter had actually had its struct fields
ignored because they were the "wrong" case....  Both tests fixed.
@github-actions
Copy link

github-actions bot commented Jan 6, 2022

PR #13142: Size comparison from 89b87f1 to b1c5973

Increases above 0.2%:

platform target config section 89b87f1 b1c5973 change % change
esp32 all-clusters-app c3devkit .dram0.bss 69288 69544 256 0.4
m5stack .dram0.bss 73776 74032 256 0.3
linux chip-tool-ipv6only arm64 (read only) 7011468 7030604 19136 0.3
.text 5936084 5954212 18128 0.3
Increases (4 builds for esp32, linux, p6)
platform target config section 89b87f1 b1c5973 change % change
esp32 all-clusters-app c3devkit (read only) 889178 890454 1276 0.1
(read/write) 1313770 1314026 256 0.0
.dram0.bss 69288 69544 256 0.4
.flash.text 889178 890454 1276 0.1
m5stack (read only) 949083 950267 1184 0.1
(read/write) 445352 445608 256 0.1
.dram0.bss 73776 74032 256 0.3
.flash.text 943699 944883 1184 0.1
linux chip-tool-ipv6only arm64 (read only) 7011468 7030604 19136 0.3
(read/write) 324849 324913 64 0.0
.got 56888 56960 72 0.1
.rodata 383108 383908 800 0.2
.text 5936084 5954212 18128 0.3
p6 all-clusters-app default (read/write) 2401288 2402584 1296 0.1
.bss 116748 117004 256 0.2
.text 1359552 1360848 1296 0.1
Full report (26 builds for efr32, esp32, k32w, linux, nrfconnect, p6, qpg, telink)
platform target config section 89b87f1 b1c5973 change % change
efr32 lighting-app BRD4161A (read only) 829396 829396 0 0.0
(read/write) 127068 127068 0 0.0
.bss 125192 125192 0 0.0
.data 1876 1876 0 0.0
.text 829388 829388 0 0.0
BRD4161A+rpc (read only) 816576 816576 0 0.0
(read/write) 143736 143736 0 0.0
.bss 141760 141760 0 0.0
.data 1976 1976 0 0.0
.text 816568 816568 0 0.0
window-app BRD4161A (read only) 802844 802844 0 0.0
(read/write) 126008 126008 0 0.0
.bss 124176 124176 0 0.0
.data 1832 1832 0 0.0
.text 802836 802836 0 0.0
esp32 all-clusters-app c3devkit (read only) 889178 890454 1276 0.1
(read/write) 1313770 1314026 256 0.0
.dram0.bss 69288 69544 256 0.4
.dram0.data 14236 14236 0 0.0
.flash.rodata 177184 177184 0 0.0
.flash.text 889178 890454 1276 0.1
.iram0.text 62254 62254 0 0.0
m5stack (read only) 949083 950267 1184 0.1
(read/write) 445352 445608 256 0.1
.dram0.bss 73776 74032 256 0.3
.dram0.data 34064 34064 0 0.0
.flash.rodata 206504 206504 0 0.0
.flash.text 943699 944883 1184 0.1
.iram0.text 122671 122671 0 0.0
k32w light k32w061+release (read/write) 648472 648472 0 0.0
.bss 76216 76216 0 0.0
.data 1904 1904 0 0.0
.text 564552 564552 0 0.0
lock k32w061+release (read/write) 633296 633296 0 0.0
.bss 75928 75928 0 0.0
.data 1860 1860 0 0.0
.text 549708 549708 0 0.0
linux chip-tool-ipv6only arm64 (read only) 7011468 7030604 19136 0.3
(read/write) 324849 324913 64 0.0
.bss 54209 54209 0 0.0
.data 1096 1096 0 0.0
.data.rel.ro 208968 208968 0 0.0
.dynamic 560 560 0 0.0
.got 56888 56960 72 0.1
.init 24 24 0 0.0
.init_array 168 168 0 0.0
.rodata 383108 383908 800 0.2
.text 5936084 5954212 18128 0.3
thermostat-no-ble arm64 (read only) 2024348 2024348 0 0.0
(read/write) 144049 144049 0 0.0
.bss 64001 64001 0 0.0
.data 880 880 0 0.0
.data.rel.ro 72296 72296 0 0.0
.dynamic 560 560 0 0.0
.got 3936 3936 0 0.0
.init 24 24 0 0.0
.init_array 296 296 0 0.0
.rodata 128524 128524 0 0.0
.text 1683152 1683152 0 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 935763 935763 0 0.0
bss 118188 118188 0 0.0
rodata 108048 108048 0 0.0
text 631948 631948 0 0.0
nrf52840dk_nrf52840+rpc (read/write) 921187 921187 0 0.0
bss 115232 115232 0 0.0
rodata 100488 100488 0 0.0
text 627300 627300 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 846706 846706 0 0.0
bss 116080 116080 0 0.0
rodata 101220 101220 0 0.0
text 548888 548888 0 0.0
lock-app nrf52840dk_nrf52840 (read/write) 907875 907875 0 0.0
bss 117376 117376 0 0.0
rodata 103320 103320 0 0.0
text 609820 609820 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 819046 819046 0 0.0
bss 115296 115296 0 0.0
rodata 96544 96544 0 0.0
text 526796 526796 0 0.0
pigweed-app nrf52840dk_nrf52840 (read/write) 541835 541835 0 0.0
bss 52588 52588 0 0.0
rodata 50104 50104 0 0.0
text 376940 376940 0 0.0
pump-app nrf52840dk_nrf52840 (read/write) 909151 909151 0 0.0
bss 117136 117136 0 0.0
rodata 103532 103532 0 0.0
text 611032 611032 0 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 905987 905987 0 0.0
bss 117164 117164 0 0.0
rodata 102792 102792 0 0.0
text 608568 608568 0 0.0
shell nrf52840dk_nrf52840 (read/write) 796843 796843 0 0.0
bss 109536 109536 0 0.0
rodata 78188 78188 0 0.0
text 532664 532664 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 709670 709670 0 0.0
bss 107424 107424 0 0.0
rodata 72492 72492 0 0.0
text 450340 450340 0 0.0
p6 all-clusters-app default (read/write) 2401288 2402584 1296 0.1
.bss 116748 117004 256 0.2
.data 2592 2592 0 0.0
.text 1359552 1360848 1296 0.1
light-app default (read/write) 2324568 2324568 0 0.0
.bss 105872 105872 0 0.0
.data 2384 2384 0 0.0
.text 1282832 1282832 0 0.0
lock-app default (read/write) 2296768 2296768 0 0.0
.bss 104752 104752 0 0.0
.data 2336 2336 0 0.0
.text 1255032 1255032 0 0.0
qpg lighting-app qpg6105+debug (read only) 531664 531664 0 0.0
(read/write) 146936 146936 0 0.0
.bss 86672 86672 0 0.0
.data 1004 1004 0 0.0
.text 526344 526344 0 0.0
lock-app qpg6105+debug (read only) 503444 503444 0 0.0
(read/write) 146940 146940 0 0.0
.bss 85808 85808 0 0.0
.data 952 952 0 0.0
.text 498124 498124 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) 832242 832242 0 0.0
bss 86856 86856 0 0.0
noinit 37160 37160 0 0.0
text 580682 580682 0 0.0

@bzbarsky-apple bzbarsky-apple merged commit eb913a7 into project-chip:master Jan 6, 2022
@bzbarsky-apple bzbarsky-apple deleted the lists-inside-lists branch January 6, 2022 20:55
step0035 pushed a commit to hank820/connectedhomeip that referenced this pull request Feb 8, 2022
…ect-chip#13142)

The main issue was that comparing to such a value failed because we
ended up with "iter" variables for both levels of list nesting that
name-collided.

The fix for that was to add "depth" disabmbiguation like we have in
the Darwin codegen already.

While adding a test for this, a few other issues were encountered:

1) The "commandValue" partial, when dealing with an optional or
nullable struct, would do an Emplace() or SetNonNull() for every
single member, which would wipe out earlier members.  The fix for that
is to do them once, and then use .Value() for the recursive partial
invocation.

2) When sending a struct with optional fields, we were requiring the
YAML to specify values for all the fields.  Added
if_include_struct_item_value to allow the YAML to not include values
for such fields.

3) The YAML for checking struct values expected struct field names in
the YAML to be lowerCamelCase instead of matching the XML case.  The
code for sending struct values expected struct field names to match
the XML case.  This inconsistency was very confusing, and this PR
makes both expect the XML case.  I verified that the only codegen
changes due to this were in the TestModeSelectCluster and
Test_TC_DM_2_2 tests.  The latter had actually had its struct fields
ignored because they were the "wrong" case....  Both tests fixed.
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.

3 participants