cue icon indicating copy to clipboard operation
cue copied to clipboard

evaluator: inconsistent export output for different formats based on what default is selected

Open gisle opened this issue 9 months ago • 3 comments

What version of CUE are you using (cue version)?

$ cue version
cue version v0.8.2

go version go1.22.2
      -buildmode exe
       -compiler gc
       -trimpath true
     CGO_ENABLED 0
          GOARCH arm64
            GOOS darwin

Does this issue reproduce with the latest stable release?

I belive v0.8.2 to be the latest stable release.

What did you do?

I tried to cue export based on this definition:

foo: *42 | _
foo: *43 | bool

What did you expect to see?

I expected it to actually complain about incompatible defaults, and if not that get consistent export output.

What did you see instead?

I see different result when I export as JSON than YAML or Cue.

$ cue export foo43.cue
{
    "foo": 43
}

$ cue export foo43.cue --out yaml
foo: 42

$ cue export foo43.cue --out cue
foo: 42

gisle avatar May 18 '24 09:05 gisle