We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
cue version
$ cue version cue version v0.0.0-20240712164527-719893f23850 go version go1.22.3 -buildmode exe -compiler gc DefaultGODEBUG httplaxcontentlength=1,httpmuxgo121=1,tls10server=1,tlsrsakex=1,tlsunsafeekm=1 CGO_ENABLED 1 GOARCH arm64 GOOS linux vcs git vcs.revision 719893f23850172d224720e6d1257586179ac895 vcs.time 2024-07-12T16:45:27Z vcs.modified false cue.lang.version v0.10.0
Yes
# evalv3 env CUE_EXPERIMENT=evalv3 exec cue export x.cue cmp stdout stdout.golden # old evaluator env CUE_EXPERIMENT= exec cue export x.cue cmp stdout stdout.golden -- x.cue -- foo: { a: false | *{} b: false | *{} } foo: a: {} a: [ if (foo.a & bool) != _|_ {"false"}, if (foo.a & {}) != _|_ {"map"}, ][0] b: [ if (foo.b & bool) != _|_ {"false"}, if (foo.b & {}) != _|_ {"map"}, ][0] -- stdout.golden -- { "foo": { "a": {}, "b": {} }, "a": "map", "b": "map" }
Passing test.
# evalv3 (0.013s) > env CUE_EXPERIMENT=evalv3 > exec cue export x.cue [stdout] { "foo": { "a": {}, "b": {} }, "a": "map", "b": "false" } > cmp stdout stdout.golden diff stdout stdout.golden --- stdout +++ stdout.golden @@ -4,5 +4,5 @@ "b": {} }, "a": "map", - "b": "false" + "b": "map" } FAIL: /tmp/testscript3437600263/repro.txtar/script.txtar:4: stdout and stdout.golden differ
For completeness, the same error is seen with the old evaluator, i.e. neither consistently handles comparison with bottom in the presence of defaults.
This is related to #943 in that comparison with bottom is not well defined.
The text was updated successfully, but these errors were encountered:
#3250
Sorry, something went wrong.
Thank you for flagging, I had missed that issue.
& does not "pick" a default (see spec). So foo.b & bool results in false.
&
foo.b & bool
false
No branches or pull requests
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.
What did you see instead?
For completeness, the same error is seen with the old evaluator, i.e. neither consistently handles comparison with bottom in the presence of defaults.
This is related to #943 in that comparison with bottom is not well defined.
The text was updated successfully, but these errors were encountered: