yq icon indicating copy to clipboard operation
yq copied to clipboard

128+ character long key weird behaviour

Open Diliz opened this issue 1 year ago • 4 comments

Describe the bug When I use 128+ character long keys, it have the following issue.

Note that any how to questions should be posted in the discussion board and not raised as an issue.

Version of yq: v4.34.1 Operating system: on all operating systems Installed via: binary from release and from source code as well

Input Yaml data1.yml:

iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii: true
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii: true

Command The command you ran:

yq '.' data1.yml

Actual behavior

? iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
: true
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii: true

Expected behavior

iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii: true
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii: true

Additional context

What seems to be related:

  • https://github.com/go-yaml/yaml/issues/849
  • https://github.com/mikefarah/yq/blob/f15500b20a1c991c8729870ba60a4dc3524b6a94/pkg/yqlib/encoder_yaml.go#L11

Maybe I'm wrong, but maybe fully switching to goccy would solve this issue ?

Diliz avatar Jun 21 '24 07:06 Diliz

This seems a duplicate of #1192 . I have already opened a MR https://github.com/go-yaml/yaml/pull/1031 however, it may need some tests and ensuring backwards compatibility according to the maintainer. If you could help me, maybe we can make it go through

DMaxter avatar Jun 23 '24 22:06 DMaxter

The go-yaml library seems pretty inactive from my point of view, a lot of issues and pull requests opened with no response, never merged, no updates since 2022, other peoples are asking if this project is dead or not since nobody got time to look for issues and prs: https://github.com/go-yaml/yaml/issues/1034

Diliz avatar Jun 24 '24 06:06 Diliz

The maintainer sometimes answers discussions, maybe we are lucky. In the mean time somebody made a much more complete PR than mine, here is the link so we can keep track of it https://github.com/go-yaml/yaml/pull/1037

DMaxter avatar Jun 25 '24 12:06 DMaxter

@mikefarah is there plans to move to goccy?

Diliz avatar Jul 03 '24 09:07 Diliz