ddev icon indicating copy to clipboard operation
ddev copied to clipboard

Move from go-yaml/yaml to yaml/go-yaml for yaml processing

Open rfay opened this issue 7 months ago • 7 comments

Is your feature request related to a problem?

go-yaml/yaml.v3 (gopkg.in/yaml.v3) has been archived and is no longer maintained. It never got very good maintenance.

Reference:

  • https://github.com/darccio/mergo/pull/262
  • https://github.com/stretchr/testify/issues/1724 (testify usage)

Possibilities:

  • https://github.com/yaml/go-yaml (fork of our currently-used yaml package, to be maintained by the yaml org)
  • https://github.com/goccy/go-yaml
  • https://github.com/kubernetes-sigs/yaml

Currently testify (used only in tests) still uses go-yaml/yaml, apparently it's pluggable,

  • https://github.com/stretchr/testify/issues/1724#issuecomment-2821601490

rfay avatar May 09 '25 20:05 rfay

It looks like https://github.com/yaml/go-yaml has taken over official fork of go-yaml.v3

rfay avatar May 12 '25 15:05 rfay

Can you give a bit more details on the implications of this? @rfay

Victor-Elkins avatar May 13 '25 14:05 Victor-Elkins

@Victor-Elkins https://github.com/go-yaml/yaml is now officially unmaintained, so it's time to move to something that has good maintenance. go-yaml/yaml was always very spotty, so this is probably a good thing. https://github.com/yaml/go-yaml looks like an ambitious start, although it doesn't seem ready to use at this moment.

rfay avatar May 13 '25 14:05 rfay

I get that, but when you say it's taken over official fork of go-yaml.v3 I'm a bit confused on what that means. How do we know it's the "official" fork? I'm mainly curious because two more popular libraries (Gin and Go-OpenAPI Swag) are both dependent on yaml v3 despite it being an unmantained package so I'm curious if having it as an official fork provides some kind of work around, or if a full migration is just inevitable for this.

Victor-Elkins avatar May 13 '25 15:05 Victor-Elkins

This probably isn't the place to discuss it, but good point.

  • Is there any such thing as an "official" fork?
  • It's the yaml org that is promoting the fork. That seems good. And they're sounding ambitious.
  • It's a direct fork of the package that has been archived. That is good for us, because it means less likelihood of compatibility problems like we already discovered with the unrelated but similar https://github.com/goccy/go-yaml

rfay avatar May 13 '25 15:05 rfay

Thanks so much man that makes a lot of sense. Really appreciate it!

Victor-Elkins avatar May 13 '25 15:05 Victor-Elkins

There's no need for immediate action on this. The yaml/go-yaml project is moving along, and they may actually use the same vanity URL in the end. Moved to backlog.

rfay avatar May 16 '25 15:05 rfay