Skip to content

encoding/toml: more errors do not include location information #3379

@jpluscplusm

Description

@jpluscplusm

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

$ cue version
cue version v0.10.0

go version go1.23.0
      -buildmode exe
       -compiler gc
       -trimpath true
     CGO_ENABLED 0
          GOARCH amd64
            GOOS linux
         GOAMD64 v1
cue.lang.version v0.10.0

Does this issue reproduce with the latest stable release?

0.10.0 is latest.

What did you do?

! exec cue export x.yml x.json
stderr x.yml
stderr x.json

! exec cue export x.yml x.toml
stderr x.yml
stderr x.toml
-- x.yml --
a: 1
-- x.json --
{
    "a": 2
}
-- x.toml --
a = 3

What did you expect to see?

A passing test, given that 0.10.0 includes the fix for #3339.

What did you see instead?

> ! exec cue export x.yml x.json
[stderr]
a: conflicting values 1 and 2:
    ./x.json:2:10
    ./x.yml:1:4
[exit status 1]
> stderr x.yml
> stderr x.json
> ! exec cue export x.yml x.toml
[stderr]
a: conflicting values 1 and 3:
    ./x.yml:1:4
[exit status 1]
> stderr x.yml
> stderr x.toml
FAIL: /tmp/testscript2529441397/toml.encoding.errorMessagesLackLocations.txtar/script.txtar:7: no match for `x.toml` found in stderr

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions