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
Does this issue reproduce with the latest stable release?
yes
What did you do?
package main
import (
"fmt""cuelang.org/go/cue""cuelang.org/go/cue/cuecontext""cuelang.org/go/encoding/yaml"
)
constval=`// will it appear in yamli: int | *123`funcmain() {
var (
c*cue.Contextv cue.Value
)
// create a contextc=cuecontext.New()
// compile some CUE into a Valuev=c.CompileString(val)
yamlSkeleton, _:=yaml.Encode(v)
fmt.Println(string(yamlSkeleton))
}
What did you expect to see?
# will it appear in yamli: 123
What did you see instead?
i: 123
I tried debugging the issue. Below are my findings.
we are converting converting cue.Value to ast.Node at
What version of CUE are you using (
cue version
)?Does this issue reproduce with the latest stable release?
yes
What did you do?
What did you expect to see?
What did you see instead?
I tried debugging the issue. Below are my findings.
we are converting converting
cue.Value
toast.Node
atcue/encoding/yaml/yaml.go
Line 84 in d780488
The
ast.Node
supports commentcue/cue/types.go
Line 984 in d780488
below changes fixes the issue.
FROM:
cue/encoding/yaml/yaml.go
Line 84 in d780488
TO:
The text was updated successfully, but these errors were encountered: