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
cue version v0.13.0-alpha.2.0.20250327101324-32d040003e8a
go version devel go1.25-1763ee199d 2025-03-26 17:58:32 -0700
-buildmode exe
-compiler gc
DefaultGODEBUG decoratemappings=0,gotestjsonbuildtext=1,multipathtcp=0,randseednop=0,rsa1024min=0,tlsmlkem=0,x509rsacrt=0,x509usepolicies=0
CGO_ENABLED 1
GOARCH amd64
GOOS linux
GOAMD64 v3
vcs git
vcs.revision 32d040003e8a43b96d667d1ec2a2a02957853577
vcs.time 2025-03-27T10:13:24Z
vcs.modified false
cue.lang.version v0.13.0
Does this issue reproduce with the latest stable release?
Yes; tested on v0.12.0 with evalv2 too.
What did you do?
# evalv2
env CUE_EXPERIMENT=evalv3=0
exec cue export
# evalv3
env CUE_EXPERIMENT=evalv3=1
exec cue export
-- input.cue --
package p
#schema: {
a: "a1" | "a2"
if a == "a1" { b: "b" }
if a == "a2" { c: "c" }
x: "x1" | "x2"
}
out: #schema & {
a: "a2"
// Remove `#schema.x &` and the config works.
x: #schema.x & "x1"
}
What did you expect to see?
The testscript should pass, at least with evalv3; as far as I can tell, the configuration is valid. The repeating of the schema for the field out.x should not cause any issues.
The way CUE works now, this is not a bug: the comprehensions of #schema are defined at the top level, and CUE requires them to be successfully evaluated either way before a lookup may be performed on that schema.
I know it is theoretically not necessary in this case, but that is how it is defined as of now.
What version of CUE are you using (
cue version
)?Does this issue reproduce with the latest stable release?
Yes; tested on v0.12.0 with evalv2 too.
What did you do?
What did you expect to see?
The testscript should pass, at least with evalv3; as far as I can tell, the configuration is valid. The repeating of the schema for the field
out.x
should not cause any issues.What did you see instead?
The text was updated successfully, but these errors were encountered: