Repository navigation
Commit 9a80cb9
committed
fix: resolve parameter type names case-insensitively in reference validation
The EXPR extension makes job and task parameter type names
case-insensitive (RFC 0007 §2), so `type: string` is exactly as valid as
`type: STRING`. The model accepted such a declaration but then rejected
every reference to the parameter:
steps[0] -> script -> actions -> onRun -> args[0]:
Variable Param.Msg does not exist at this location.
The variable-reference prevalidation pass runs on raw template values,
before the field validator that folds the `type` discriminator to upper
case, and it resolved the type-discriminated parameter-definition union
with an exact string comparison. A lowercase or mixed-case type name
matched no member of the union, so the definition contributed none of its
`Param.*` / `RawParam.*` / `Task.Param.*` symbols and none of its EXPR
type information.
Compare the discriminator with an ASCII-only case fold when EXPR is
active, in both the reference-validation and the definition-collection
traversal. Job, task, and environment-template parameters now define
their symbols and types whatever the case of the type name. The fold is
ASCII-only so Unicode look-alikes such as `ıNT` stay rejected, matching
the field validator.1 parent 4d7f9b4 commit 9a80cb9
4 files changed
Lines changed: 111 additions & 9 deletions
File tree
- src/openjd/model/_internal
- test/openjd/model_v0/v2023_09
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
263 | 267 | | |
264 | 268 | | |
265 | 269 | | |
| |||
345 | 349 | | |
346 | 350 | | |
347 | 351 | | |
348 | | - | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
349 | 355 | | |
350 | 356 | | |
351 | 357 | | |
| |||
398 | 404 | | |
399 | 405 | | |
400 | 406 | | |
401 | | - | |
402 | | - | |
403 | | - | |
404 | | - | |
405 | 407 | | |
406 | 408 | | |
407 | 409 | | |
| |||
709 | 711 | | |
710 | 712 | | |
711 | 713 | | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
712 | 719 | | |
713 | | - | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
714 | 725 | | |
715 | 726 | | |
716 | 727 | | |
| |||
756 | 767 | | |
757 | 768 | | |
758 | 769 | | |
759 | | - | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
760 | 784 | | |
761 | 785 | | |
762 | 786 | | |
| |||
881 | 905 | | |
882 | 906 | | |
883 | 907 | | |
884 | | - | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
885 | 911 | | |
886 | | - | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
887 | 915 | | |
888 | 916 | | |
889 | 917 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
319 | 319 | | |
320 | 320 | | |
321 | 321 | | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
322 | 337 | | |
323 | 338 | | |
324 | 339 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
172 | 215 | | |
173 | 216 | | |
174 | 217 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
900 | 900 | | |
901 | 901 | | |
902 | 902 | | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
903 | 919 | | |
904 | 920 | | |
905 | 921 | | |
| |||
0 commit comments