metomi / rose

:rose: Rose is a toolkit for writing, editing and running application configurations.
https://metomi.github.io/rose/
GNU General Public License v3.0
55 stars 50 forks source link

Replace "template variables" with "template_variables" #2783

Closed wxtim closed 1 month ago

wxtim commented 3 months ago

... at the start of rose metadata-check to prevent the space being a violation of the rose mini-language.

closes #2737

oliver-sanders commented 3 months ago

@wxtim, this issue may affect things other than rose metadata-check so I think this fix will need to be applied at the more-fundamental mini-language level, not the command level.

(unless all metadata gets passed through this interface first before being used?)

oliver-sanders commented 2 months ago

(oh, we should probably put this on 2.3.x)

oliver-sanders commented 2 months ago

@wxtim, can you rebase to drop the "bump version" commit (doesn't belong on the 2.3.x branch) and squash the remainder.

oliver-sanders commented 2 months ago

Tested with this config:

# ./meta/rose-meta.conf
[template variables=FOO]          
fail-if=template variables=FOO == 1 and template variables=BAR == 1     

[template variables=BAR]

[template variables=BAZ]
length=3
fail-if=template variables=BAZ(1) == 1 or len(template variables=BAZ) == 2 or any(template variables=BAZ == 4)

# ./rose-suite.conf
[template variables]
FOO=2
BAR=1
BAZ=2,2,3

Worked great.