Open mpvl opened 2 years ago
See also #1479
cue version
v0.4.1
cue def of
cue def
b: {...} check: len(b) == 1
results in
This is correct, as the number of elements in b might change as the schema gets more concrete.
b
Similarly, cue def of
b: {...} check: len(b) == 1 check: true
should result in an unchanged configuration.
Instead it results in
check: conflicting values true and false: -:2:5 -:3:5
This is because CUE evaluates this as a "fatal" error (an error that cannot be solved by making a configuration more specific), even though it is not.
Confirmed with commit dc2c9e0950f36895f819171cab447eb7b54758e0.
Testscript reproducer:
exec cue def x.cue -- x.cue -- b: {...} check: len(b) == 1 check: true
See also #1479
What version of CUE are you using (
cue version
)?v0.4.1
What did you do?
cue def
ofresults in
This is correct, as the number of elements in
b
might change as the schema gets more concrete.Similarly,
cue def
ofshould result in an unchanged configuration.
Instead it results in
This is because CUE evaluates this as a "fatal" error (an error that cannot be solved by making a configuration more specific), even though it is not.