You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ cue version
cue version v0.12.0
go version go1.24.1
-buildmode exe
-compiler gc
-trimpath true
DefaultGODEBUG asynctimerchan=1,gotestjsonbuildtext=1,gotypesalias=0,httpservecontentkeepheaders=1,multipathtcp=0,randseednop=0,rsa1024min=0,tls3des=1,tlsmlkem=0,x509keypairleaf=0,x509negativeserial=1,x509rsacrt=0,x509usepolicies=0
CGO_ENABLED 1
GOARCH amd64
GOOS linux
GOAMD64 v1
cue.lang.version v0.12.0
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 with errors.Print:
field Foo not present in {Foo:{crc:32}}:
./schema.cue:2:15
field crc not present in {crc:32}:
./schema.cue:2:20
field messages not present in {messages:{Foo:{crc:32}}}:
./schema.cue:1:6
missing field "messages"
What did you expect to see?
More useful error messages would be
31 | 33 does not subsume 32:
./schema.cue:2:25
./schema.cue:7:25
{Foo:{crc:31 | 33}} does not subsume {Foo:{crc:32}}:
./schema.cue:2:15
./schema.cue:7:15
{crc:31 | 33} does not subsume {crc:32}:
./schema.cue:2:20
./schema.cue:7:20
What did you see instead?
field Foo not present in {Foo:{crc:32}}:
./schema.cue:2:15
field crc not present in {crc:32}:
./schema.cue:2:20
field messages not present in {messages:{Foo:{crc:32}}}:
./schema.cue:1:6
missing field "messages"
The text was updated successfully, but these errors were encountered:
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]>
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]>
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]>
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]>
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: