Skip to content

Replace go-yaml/yaml with goccy/go-yaml #2298

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
neiser opened this issue Feb 21, 2025 · 5 comments
Open

Replace go-yaml/yaml with goccy/go-yaml #2298

neiser opened this issue Feb 21, 2025 · 5 comments

Comments

@neiser
Copy link

neiser commented Feb 21, 2025

Please describe your feature request.
yq increasingly suffers from the fact that the underlying go-yaml/yaml library is rather unmaintained and lacks some important functionality for some yq use cases.

Describe the solution you'd like
yq could migrate to a new kid in town, the goccy/go-yaml.
According to its README, the library aims to replace the go-yaml/yaml library and has some really nice additional features, such as:

Reversible transformation without using the AST for YAML that includes Anchors, Aliases, and Comments

This feature is in particular interesting for yq -i use cases, which unfortunately might modify whitespace due to limitations in the go-yaml/yaml library.

@mikefarah
Copy link
Owner

Totally agree, I actually started doing this late 2023 but hit some snags on their repo. I can see That this was closed recently..worth trying again when I get free time

@neiser
Copy link
Author

neiser commented Feb 22, 2025

@mikefarah Thanks for your effort! Really appreciate your effort!

@goccy
Copy link

goccy commented Mar 17, 2025

@mikefarah Please let me know if the migration is being hindered by an issue with my library. I will prioritize addressing it.

@Mivr
Copy link

Mivr commented Mar 19, 2025

Hey @mikefarah, will you have time for this soon?

And if not, can you offer some general guidance in case I or anyone else finds the time to work on this?

@yesudeep
Copy link

@mikefarah https://github.com/go-yaml/yaml has been deprecated and archived. Can we please update to using https://github.com/goccy/go-yaml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants