Repository navigation
Migrate off the archived gopkg.in/yaml.v3 - #349
Merged
Merged
Conversation
- gopkg.in/yaml.v3 was archived in April 2025; yaml/go-yaml under the official YAML org is its successor - The successor recommends v4, but v4.0.0-rc.6 is not GA yet, so pick the GA'd, drop-in v3 instead - Ran `go get go.yaml.in/yaml/v3@v3.0.5 && go mod tidy`
Merged
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.
Closes #299
gopkg.in/yaml.v3(go-yaml/yaml) was archived in April 2025. Move togo.yaml.in/yaml, the successor maintained by the official YAML organization.Changes
lib/settings.gofromgopkg.in/yaml.v3togo.yaml.in/yaml/v3yaml, so theyaml.Unmarshalcall is untouchedgo get go.yaml.in/yaml/v3@v3.0.5 && go mod tidygithubproxy.fjygbaifeng.eu.org/kr/prettyandgopkg.in/check.v1indirect requirements, which came fromgopkg.in/yaml.v3's test dependenciesWhy v3 and not v4
The upstream README recommends
v4for new projects and upgrades, butv4.0.0-rc.6(2026-06-17) is still the latest — no GA about a year afterrc.1.v3is GA and still shipping (v3.0.5, 2026-07-26), and the migration is a pure import-path swap.This matches spf13/cobra#2336, which is referenced in #299.
The tradeoff is that upstream treats v1–v3 as frozen legacy receiving security fixes only, so a second migration to v4 will be needed once it reaches GA.
Verification
make test-allpasses (vet, golint, tests)TestFormatAllinlib/format_test.go, which callssettings.Init("", "")to unmarshal the embeddedconfig/settings.ymland asserts output built fromformat.lineanddictionary.status.*TestInitinlib/settings_test.goist.Skipped, so it does not cover thismake && ./github-nippou listproduces the expected output against the real APIconfig/settings.ymlcontains only strings, so the YAML 1.1/1.2 differences documented upstream (bools, octals) do not apply here.