Repository navigation
Migrate from gopkg.in/yaml.v2 to go.yaml.in/yaml/v3 - #140
Open
justinhwang wants to merge 1 commit into
Open
justinhwang wants to merge 1 commit into
justinhwang wants to merge 1 commit into
Conversation
Replace the YAML backend with go.yaml.in/yaml/v3 and adopt its behavior.
Because v3 follows the YAML 1.2 core schema, several parsing behaviors
change:
- Only true/false (and their case variants) are Booleans; the YAML 1.1
spellings yes/no/on/off are now plain strings.
- Duplicate keys are always rejected, even in permissive mode; keys with
the same textual form (e.g. 2 and "2") count as duplicates.
- Mappings are represented as map[string]any (v3's native type) instead
of map[interface{}]interface{}; non-string scalar keys are rendered in
canonical string form. Merged output is re-serialized by v3.
Also switch SetStrict to KnownFields, add merge.Normalize/StringifyKey to
collapse v3's map shapes into map[string]any, and replace interface{}
with any throughout.
These are backward-incompatible changes that warrant a v2.0.0 release
(module path go.uber.org/config/v2), tracked separately.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Replace the YAML backend with go.yaml.in/yaml/v3 and adopt its behavior. Because v3 follows the YAML 1.2 core schema, several parsing behaviors change:
Also switch SetStrict to KnownFields, add merge.Normalize/StringifyKey to collapse v3's map shapes into map[string]any, and replace interface{} with any throughout.
These are backward-incompatible changes that warrant a v2.0.0 release (module path go.uber.org/config/v2), tracked separately.