summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTristan van Berkom <tristan.vanberkom@codethink.co.uk>2020-07-24 15:52:05 +0900
committerTristan van Berkom <tristan.vanberkom@codethink.co.uk>2020-07-29 19:04:23 +0900
commit24703a8434b48ebe58326f990e2d5a0474fe76da (patch)
treebf66afc17c092f9a14126f6a2bba956c2576a471 /tests
parentfecf3534d887e52b5bf5bbc5ef6861a54d858d12 (diff)
downloadbuildstream-24703a8434b48ebe58326f990e2d5a0474fe76da.tar.gz
node.pyx: Support merging of conditional sequences
During composition of project.conf, it can happen that we are including and composing node hierarchies before options are resolved and before we are ready to evaluate conditional statements. Without this patch, conditional statements are treated like regular sequences, causing existing conditional statements to be overwritten by subsequently composited conditional statements without ever having been resolved. This patch introduces a special case for composing sequences, when composing a sequence that is a conditional statement, the sequence is appended instead of overwriting the underlying list. Note that precedence of declarations in including vs included yaml fragments did raise some concern, and a test in the following commit is added to cover this case. Composition of conditional lists on top of other conditional lists are unconditionally appended, however the semantics of includes ensures that the including fragment's conditionals is always composited *on top* over the included fragment, ensuring that we have the correct pecedence even when compositing yet to be resolved conditional directives.
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions