Repository navigation
Commit 110018a
committed
test: Wrap a RANGE_EXPR parameter in string() before repr_sh
The `parameter_types::all_types_scenario.yaml` scenario has been failing CI with:
Failed to parse interpolation expression at [378, 411].
No matching signature for repr_sh(range_expr)
repr_sh(Param.RangeExprParam)
`repr_sh` is registered for `(string)`, `(path)`, `(list[string])`,
`(list[path])` and `(list[nulltype])`. It has no `range_expr` overload, so
openjd-model 0.11.3 is right to reject this and the template was wrong. `string`
does declare `(range_expr) -> string`, so wrapping resolves it, and every other
non-string parameter on the surrounding lines already does exactly that:
echo IntParam={{repr_sh(string(Param.IntParam))}}
echo BoolParam={{repr_sh(string(Param.BoolParam))}}
echo len-RangeExprParam={{repr_sh(string(len(Param.RangeExprParam)))}}
The rendered output is unchanged, so the scenario's expected
`RangeExprParam=10-15` still matches. Confirmed by running the scenario against a
build that accepts both forms: it passes before and after, which is what makes
this a signature fix rather than a behaviour change.
This is the only affected call. The other bare `repr_sh(Param.*)` uses in the
test scenarios are all `string` or `path` typed, which it accepts.
Unrelated to the rest of this branch. It surfaces here only because CI resolves
released openjd-model while a local editable checkout can be on an older build
that still accepted the bare form. Separated into its own commit so it can be
dropped or landed independently.
Signed-off-by: David Leong <116610336+leongdl@users.noreply.github.com>1 parent 3574ced commit 110018a
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
0 commit comments