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.4.3 darwin/arm64
Also tested on cue version v0.4.4-0.20220706163258-2795dcc4db87
cue version v0.4.4-0.20220706163258-2795dcc4db87
Yes.
Attempt to unmarshal YAML content that is just a comment using encoding/yaml.
encoding/yaml
Given test.cue with:
test.cue
import "encoding/yaml" out: yaml.Unmarshal("#test")
Running cue eval test.cue
cue eval test.cue
Certainly not a panic. Likely an empty output or bottom?
A panic:
panic: assertion failed: nil return value: unspecified error [recovered] panic: assertion failed: nil return value: unspecified error goroutine 1 [running]: cuelang.org/go/cmd/cue/cmd.recoverError(0x140005bfe70) cuelang.org/go/cmd/cue/cmd/root.go:229 +0x98 panic({0x1035261c0, 0x1400071c860}) runtime/panic.go:838 +0x204 cuelang.org/go/internal/core/adt.Assertf(...) cuelang.org/go/internal/core/adt/context.go:93 cuelang.org/go/internal/core/adt.(*OpContext).evaluateRec(0x14000719ad0, 0x1400011f7c0, {0x103610a68, 0x14000113140}, 0x78?) cuelang.org/go/internal/core/adt/context.go:582 +0x280 ...
The text was updated successfully, but these errors were encountered:
This actually applies to not just comments, but any time yaml.Unmarshal() is called on anything that returns no actual value (like an empty string).
yaml.Unmarshal()
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
What version of CUE are you using (
cue version
)?Also tested on
cue version v0.4.4-0.20220706163258-2795dcc4db87
Does this issue reproduce with the latest release?
Yes.
What did you do?
Attempt to unmarshal YAML content that is just a comment using
encoding/yaml
.Given
test.cue
with:Running
cue eval test.cue
What did you expect to see?
Certainly not a panic. Likely an empty output or bottom?
What did you see instead?
A panic:
The text was updated successfully, but these errors were encountered: