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-alpha.1.0.20250103115825-74a0c9d01e05
go version go1.23.0
-buildmode exe
-compiler gc
DefaultGODEBUG asynctimerchan=1,gotypesalias=0,httpservecontentkeepheaders=1,tls3des=1,tlskyber=0,x509keypairleaf=0,x509negativeserial=1
CGO_ENABLED 1
GOARCH amd64
GOOS linux
GOAMD64 v1
cue.lang.version v0.12.0
Does this issue reproduce with the latest stable release?
No; the repro passes with v0.11.1 (modulo a slightly different validation error message).
What did you do?
! exec cue vet -c working.cue
cmp stderr out.working
! exec cue vet -c broken.cue
-- working.cue --
import "list"
A: [1, 1]
B: {
42
_check: list.UniqueItems & A
}
-- broken.cue --
import "list"
A: [{a: 1}, {a: 1}]
B: {
42
_check: list.UniqueItems & A
}
-- out.working --
B._check: invalid value [1,1] (does not satisfy list.UniqueItems): equal value (1) at position 0 and 1:
./working.cue:6:10
What did you expect to see?
A passing test.
What did you see instead?
> ! exec cue vet -c working.cue
[stderr]
B._check: invalid value [1,1] (does not satisfy list.UniqueItems): equal value (1) at position 0 and 1:
./working.cue:6:10
[exit status 1]
> cmp stderr out.working
> ! exec cue vet -c broken.cue
FAIL: /tmp/testscript4225105853/list.uniqueitems.txtar/script.txtar:4: unexpected command success
The text was updated successfully, but these errors were encountered:
myitcv
changed the title
list/UniqueItems: validation breaks when used on a hidden list of structs next to an embedded value
pkg/list: UniqueItems validation breaks when used on a hidden list of structs next to an embedded value
Jan 3, 2025
What version of CUE are you using (
cue version
)?Does this issue reproduce with the latest stable release?
No; the repro passes with v0.11.1 (modulo a slightly different validation error message).
What did you do?
What did you expect to see?
A passing test.
What did you see instead?
The text was updated successfully, but these errors were encountered: