Skip to content

Migrate from gopkg.in/yaml.v3 to go.yaml.in/yaml/v3#70

Merged
stefanvanburen merged 1 commit into
bufbuild:mainfrom
scop:chore/go-yaml-in
May 5, 2026
Merged

Migrate from gopkg.in/yaml.v3 to go.yaml.in/yaml/v3#70
stefanvanburen merged 1 commit into
bufbuild:mainfrom
scop:chore/go-yaml-in

Conversation

@scop
Copy link
Copy Markdown
Contributor

@scop scop commented Dec 30, 2025

gopkg.in/yaml.v3 is unmaintained, ref
https://github.com/yaml/go-yaml#project-status

Upgrade to 3.0.4 while at it.

3.0.1...3.0.2 diff (3.0.1 are identical):
https://gist.github.com/scop/6ec72debf62a9603cff9dc97e6814ddd

3.0.2...3.0.4 diff:
yaml/go-yaml@v3.0.2...v3.0.4

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Dec 30, 2025

CLA assistant check
All committers have signed the CLA.

Comment thread go.mod
golang.org/x/text v0.23.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This remaining indirect one comes from github.com/stretchr/testify. PR at stretchr/testify#1772

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it'd be really wonderful if they merged that PR ...

Copy link
Copy Markdown
Contributor

@stefanvanburen stefanvanburen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey @scop, thanks for the PR — any reason to keep this at yaml/v3 instead of upgrading to v4? (It's honestly a little tricky to even tell the difference in the upstream repo given the lack of a CHANGELOG.md or proper releases...)

Comment thread go.mod
golang.org/x/text v0.23.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it'd be really wonderful if they merged that PR ...

@scop
Copy link
Copy Markdown
Contributor Author

scop commented Apr 24, 2026

any reason to keep this at yaml/v3 instead of upgrading to v4?

Two reasons: I wanted to keep the change here as small as possible and v4 is still a release candidate (4.0.0-rc4 at time of writing).

@stefanvanburen
Copy link
Copy Markdown
Contributor

Gotcha, for whatever reason I was under the impression that they had released v4 by now, but I see it's still being planned/discussed: yaml/go-yaml#237.

I think:

  • Regardless of the v4 API shape, it'd be good for us to move this over to a maintained (non-archived) dependency
  • It seems like testify will eventually move over and eliminate the other dep, but regardless, we won't be carrying those in regular binaries anyway

Just going to merge main to kick CI and get this merged.

@stefanvanburen stefanvanburen changed the title chore(deps): migrate from gopkg.in/yaml.v3 to go.yaml.in/yaml/v3 Migrate from gopkg.in/yaml.v3 to go.yaml.in/yaml/v3 Apr 24, 2026
@stefanvanburen
Copy link
Copy Markdown
Contributor

@scop looks like there's a test failure; any chance you could look into that?

@scop scop force-pushed the chore/go-yaml-in branch from a7d8f55 to 4d79c37 Compare May 5, 2026 19:29
@scop scop force-pushed the chore/go-yaml-in branch from 4d79c37 to 6bb76ca Compare May 5, 2026 19:48
Comment thread protoyaml_test.go
}
// Should be `"\n": "\n"`, but its garbled.
if string(data) != "? |4+\n: |4+\n" {
if string(data) != "? |4+\n\n: |4+\n\n" {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this is garbled a bit differently in the new one.

@stefanvanburen stefanvanburen merged commit 4b11103 into bufbuild:main May 5, 2026
4 checks passed
@scop scop deleted the chore/go-yaml-in branch May 5, 2026 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants