-
Notifications
You must be signed in to change notification settings - Fork 297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
evaluator: final/concrete evaluation does not eliminate unsatisfied required fields from disjunctions #3285
Comments
An interesting follow-up to this issue. What if the input were:
resulting in a value:
Would this eliminate both elements from the disjunction and return an error about an empty disjunction? It's hard to see that we could do anything else. Despite there arguably being intent that the second element of the disjunction was trying to be selected, and the user simply missed off the |
One further observation regarding
Currently (as of 719893f) it fails with:
i.e. |
Noting a further offline intuition/discussion, that if this logic applies to required fields then it has to also apply to regular fields (because required fields subsume regular fields). I will update this issue with a conclusion on that point. |
What is the status of this issue? I see it was moved out of release v0.10. Is a solution expected to land in a foreseeable release? |
What version of CUE are you using (
cue version
)?Does this issue reproduce with the latest release?
Yes
What did you do?
What did you expect to see?
Passing test. Because I am running
cue export
, that should be sufficient indication tocmd/cue
that there is no more values/data coming, and hence the second element in the disjunction can be eliminated as "in error" because the required fieldb
is not satisfied.What did you see instead?
As similar sort of bug exists with the Go API, where passing
cue.Final()
orcue.Concrete(true)
to acue.Value.Validate
call.This bug follows discussion in #3165
The text was updated successfully, but these errors were encountered: