Repository navigation
chore(deps): replace archived gopkg.in/yaml.v2 with go.yaml.in/yaml/v3 - #422
Merged
benjaminjkraft merged 4 commits intoAug 8, 2026
Conversation
levenleven
force-pushed
the
levenleven/chore/replace-yaml-v2-with-maintained-fork
branch
from
July 17, 2026 14:21
7949741 to
4bed409
Compare
levenleven
marked this pull request as ready for review
July 17, 2026 14:21
levenleven
requested review from
StevenACoffman,
benjaminjkraft,
csilvers and
dnerdy
as code owners
July 17, 2026 14:21
ccoVeille
approved these changes
Jul 17, 2026
ccoVeille
left a comment
There was a problem hiding this comment.
yaml/go-yaml maintainer here
Thanks for migrating to the maintained lib.
One minor remark, otherwise LGTM 👍
gopkg.in/yaml.v2 is archived. Switch config parsing to the maintained go.yaml.in/yaml/v3 (the YAML org's successor to gopkg.in/yaml.v3), which preserves yaml.v2 behavior: YAML 1.1 booleans (yes/no/on/off), octal-looking strings, strict unknown-field rejection, and the obsolete StringList unmarshaler. UnmarshalStrict is replaced by a decoder with KnownFields(true), treating an empty file as an empty config. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
levenleven
force-pushed
the
levenleven/chore/replace-yaml-v2-with-maintained-fork
branch
from
July 18, 2026 08:12
4bed409 to
bf3c691
Compare
Collaborator
There was a problem hiding this comment.
As a check that the package is legit, it's used by e.g. dd-agent: https://github.com/DataDog/datadog-agent/blob/pkg/config/schema/v0.82.0/pkg/config/schema/go.mod. Beyond that, should be good if tests pass.
benjaminjkraft
approved these changes
Aug 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
gopkg.in/yaml.v2is archived. This swaps genqlient's config parsing to the maintainedgo.yaml.in/yaml/v3(the YAML organization's successor togopkg.in/yaml.v3).The migration is behavior-preserving vs yaml.v2, verified by comparing both libraries on genqlient's config shape:
yes/no/on/off) still decode to bools0777) stay strings, not coerced to intsKnownFields(true)replacesUnmarshalStrict)StringList's obsoleteUnmarshalYAMLis unchanged (v3 still supports it)A new
testdata/validConfig/YAML11Booleans.yamlfixture locks in the boolean and octal-string parity.Note: the transitive
gopkg.in/yaml.v3remains, pulled in only by test-only deps (gqlgen, gqlparser, testify); it will drop once those upstreams migrate.