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.10.0
go version go1.23.0
-buildmode exe
-compiler gc
-ldflags -s -w -X cuelang.org/go/cmd/cue/cmd.version=v0.10.0
DefaultGODEBUG asynctimerchan=1,gotypesalias=0,httpservecontentkeepheaders=1,tls3des=1,tlskyber=0,x509keypairleaf=0,x509negativeserial=1
CGO_ENABLED 1
GOARCH arm64
GOOS darwin
GOARM64 v8.0
vcs git
vcs.revision a7c37ee1eeb84546552bcc70aa280ab7c748e9e9
vcs.time 2024-08-14T21:53:19Z
vcs.modified false
cue.lang.version v0.10.0
Does this issue reproduce with the latest stable release?
Yes.
What did you do?
echo '""' > a.cue
cue export a.cue --out text --outfile out.txt
cue vet a.cue text: out.txt
conflicting values "" and "\n":
-
./a.cue:1:1
What did you expect to see?
I expected that cue would successfully validate the configuration it generated.
What did you see instead?
When cue exports text it adds a newline in the of the file.
hexdump out.txt
0000000 000a
0000001
This is not uncommon for terminal applications. But it breaks the validation flow. Either validation should append the newline such that the config validates, or export should not generate the newline. This only happens for text, for json any config generated by cue can be validated by the same cue file.
The text was updated successfully, but these errors were encountered:
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?
I expected that cue would successfully validate the configuration it generated.
What did you see instead?
When cue exports text it adds a newline in the of the file.
This is not uncommon for terminal applications. But it breaks the validation flow. Either validation should append the newline such that the config validates, or export should not generate the newline. This only happens for text, for json any config generated by cue can be validated by the same cue file.
The text was updated successfully, but these errors were encountered: