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
go version go1.23.7
-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?
Yes, and also from main.
What did you do?
cue import my.yaml
Where my.yaml is:
foo: &foo "hello"
*foo : "world"
What did you expect to see?
Cue successfully imports the YAML as:
foo: "hello"
hello: "world"
What did you see instead?
invalid map key: !!str
Note that in old versions (e.g 0.8.2) this wouldn't error out, but rather emit this cue file, which is incorrect:
foo: "hello"
foo: "world"
This is probably a bug in the old YAML decoder (before migrating to yaml.v3)
The text was updated successfully, but these errors were encountered:
This makes the decoder follow aliases in YAML map keys.
Before this commit the decoder would outright reject these keys as
non-scalar keys. This commit adds support specifically for keys which
are aliases to scalar values. YAML also permits non-scalar keys such as
maps / sequences, but there's no equivalent for those in CUE, so we
error out.
fixescue-lang#3821
Signed-off-by: Omri Steiner <[email protected]>
What version of CUE are you using (
cue version
)?Does this issue reproduce with the latest stable release?
Yes, and also from main.
What did you do?
Where
my.yaml
is:What did you expect to see?
Cue successfully imports the YAML as:
What did you see instead?
Note that in old versions (e.g 0.8.2) this wouldn't error out, but rather emit this cue file, which is incorrect:
This is probably a bug in the old YAML decoder (before migrating to yaml.v3)
The text was updated successfully, but these errors were encountered: