-
Notifications
You must be signed in to change notification settings - Fork 311
Error "field X not present in Y" returned by Subsume when field does exist #3861
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
Labels
Comments
GrahamDennis
added a commit
to GrahamDennis/cue
that referenced
this issue
Mar 29, 2025
Previously when Subsume determined that a field did not subsume a previous field, the error returned was: ``` field x not present in <value> ``` which is simply not true. Now a more useful error is returned in this scenario: ``` 31 | 33 does not subsume 32: ./schema.cue:2:25 ./schema.cue:7:25 ``` Resolves: cue-lang#3861 Signed-off-by: Graham Dennis <[email protected]>
GrahamDennis
added a commit
to GrahamDennis/cue
that referenced
this issue
Mar 29, 2025
Previously when Subsume determined that a field did not subsume a previous field, the error returned was: ``` field x not present in <value> ``` which is simply not true. Now a more useful error is returned in this scenario: ``` 31 | 33 does not subsume 32: ./schema.cue:2:25 ./schema.cue:7:25 ``` Resolves: cue-lang#3861 Signed-off-by: Graham Dennis <[email protected]>
GrahamDennis
added a commit
to GrahamDennis/cue
that referenced
this issue
Mar 29, 2025
Previously when Subsume determined that a field did not subsume a previous field, the error returned was: ``` field x not present in <value> ``` which is simply not true. Now a more useful error is returned in this scenario: ``` 31 | 33 does not subsume 32: ./schema.cue:2:25 ./schema.cue:7:25 ``` Resolves: cue-lang#3861 Signed-off-by: Graham Dennis <[email protected]>
GrahamDennis
added a commit
to GrahamDennis/cue
that referenced
this issue
Mar 29, 2025
Previously when Subsume determined that a field did not subsume a previous field, the error returned was: ``` field x not present in <value> ``` which is simply not true. Now a more useful error is returned in this scenario: ``` 31 | 33 does not subsume 32: ./schema.cue:2:25 ./schema.cue:7:25 ``` Resolves: cue-lang#3861 Signed-off-by: Graham Dennis <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What version of CUE are you using (
cue version
)?Does this issue reproduce with the latest stable release?
Yes
What did you do?
When following the Schema Definition use case example, the error returned can indicate that a field doesn't exist in the target schema instead of correctly indicating that they are not compatible.
In the example below I am determining if
#V2
subsumes#v1
and then printing the errors witherrors.Print
:the errors displayed are:
What did you expect to see?
More useful error messages would be
What did you see instead?
The text was updated successfully, but these errors were encountered: