chore: move to github.com/pb33f/go-yaml - #642
Open
daveshanley wants to merge 1 commit into
Open
daveshanley wants to merge 1 commit into
daveshanley wants to merge 1 commit into
Conversation
Replace go.yaml.in/yaml/v4 v4.0.0-rc.6 with github.com/pb33f/go-yaml v0.1.0, pb33f's maintained fork: upstream main plus the emitter event queue fix, under a module path we control. jsonpath, ordered-map and testify move to the same module; they are required at pseudo-versions until they are tagged. The fork drops Dumper.SetIndent. WithIndent rejects indents outside 2-9, which rc.6 accepted and emitted with 2, so RenderWithIndention clamps them to 2 itself (OriginalIndentation is 0 for minified JSON). Upstream no longer adds a blank line after folded block scalars, so the Stripe render/reload check drops from 9 description changes to 0, and 3 of the 72 golden fixtures now render as their sources do. Every other output is byte-identical. Co-Authored-By: Claude Opus 5.5 <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.
Stacked on #641. Review and merge that PR first. This diff shows only the migration.
libopenapi moves from
go.yaml.in/yaml/v4v4.0.0-rc.6 togithub.com/pb33f/go-yamlv0.1.0, pb33f's maintained fork. The fork is upstream'smainplus the emitter event-queue fix (pb33f/go-yaml#1), under a new module path (pb33f/go-yaml#2).jsonpath, ordered-map and testify pass
yaml.Nodevalues across their APIs, so they are moving to the same module:github.com/pb33f/testifymaster5ea68eagithub.com/pb33f/ordered-map/v2master68eb83fgithub.com/pb33f/jsonpathBefore merging: merge jsonpath#8, tag all three, then replace the pseudo-versions in
go.modwith the tags.go mod graphno longer containsgo.yaml.in/yaml/v4at all.Changes
go.yaml.in/yaml/v4becomesgithub.com/pb33f/go-yamlin 455 files. The package name is stillyaml, so no code referencing it changes.mainwere left unformatted; two of them had their import line moved by hand.RenderWithIndention. The fork removedDumper.SetIndent. Its replacement,WithIndent, rejects indents outside 2 to 9.OriginalIndentationcan be 0, e.g. for minified JSON.RenderWithIndentionnow clamps those values to 2 itself, so output is unchanged.SetIndent. It now renders with 2 as well.TestDocument_RenderWithIndention_OutOfRange.TestDocument_RenderAndReload_ChangeCheck_Stripenow expects 0 changes instead of 9.>) block scalars with a spurious trailing blank line. The reloaded Stripe spec therefore showed 9 description changes against the original.Output changes
A golden harness hashes every public output for all 72 spec fixtures. It covers:
Render,RenderInlineandRenderJSONCompared with #641, 69 fixtures are byte-identical. The other three change for the same reason, the folded-scalar fix described above: rc.6 added a blank line after some folded block scalars, and the new output drops it, which now matches the source files. The three are:
test_specs/minimal_remote_refs/openapi.yamltest_specs/minimal_remote_refs/schemas/components.openapi.yamltest_specs/redocly-starter.yamlTests
go build ./...,go vet ./...andgo test ./...pass.🤖 Generated with Claude Code