cue
cue copied to clipboard
cue fix transforms multiple list `+` into deeply nested Concat
What version of CUE are you using (cue version)?
$ cue version
cue version v0.11.0-alpha.3
go version go1.22.5
-buildmode exe
-compiler gc
-trimpath true
CGO_ENABLED 0
GOARCH amd64
GOOS linux
GOAMD64 v1
cue.lang.version v0.11.0
Does this issue reproduce with the latest stable release?
List addition is only disallowed in 0.11 afaik
What did you do?
// pre 0.11
l: ["a"] + ["b"] + ["c"] + ["d"]
cue fix
import 'list'
l: list.Concat([list.Concat([list.Concat([["a"], ["b"]]), ["c"]), ["d"]])
At top levels and in complex configurations, this is impossible to read or reason about clear enough to repair.
What did you expect to see?
import "list"
l: list.Concat([["a"], ["b"], ["c"], ["d"]])