Prepare documentation for the v4 release #481
Approved these changes.
Approved these changes.
With a YAML-parser plugin, later syntax errors can still fail the first Load because the complete input is parsed and its events validated before composition. Qualify this guarantee and describe the option as stopping document loading, not leaving trailing input unread (even the built-in parser can buffer ahead). Same issue in internal/libyaml/options.go:199, docs/dev/go-yaml-internals.md:24–25, and docs/releases/v4.0.0.md:107.
<!-- ccr-overview-v2 -->
🟡 Changes recommended
The option documentation overstates first-document loading guarantees, since parser plugins can reject later syntax errors and parsers may buffer trailing input.
<details open>
<summary><strong>1 open issue</strong></summary>
</details>
<details>
<summary><strong>What changed in this PR</strong></summary>
Prepares go-yaml’s documentation for stable v4.0.0, aligning public API guidance, examples, and internal architecture descriptions with the current implementation.
Changes:
| File | Description |
| ---- | ----------- |
| yaml.go | Corrects public option documentation and API examples. |
| util/release.t | Tests release validation and GitHub CLI invocation. |
| README.md | Presents v4 as stable and updates plugin and migration guidance. |
| plugin/loaderlimits/plugin.go | Corrects loader constructor examples. |
| plugin/doc.go | Updates plugin examples to use readers. |
| plugin.go | Fixes constructor usage in interface documentation. |
| internal/libyaml/README.md | Replaces obsolete architecture and testing guidance. |
| internal/libyaml/options.go | Clarifies option defaults and output behavior. |
| internal/libyaml/node.go | Documents node option boundaries and unused interfaces. |
| internal/libyaml/loader.go | Corrects the multi-document option name in a comment. |
| internal/libyaml/dumper.go | Corrects the multi-document option name in a comment. |
| internal/libyaml/doc.go | Updates the internal package description. |
| GNUmakefile | Adds draft-release creation and release tests. |
| example/version_options/main.go | Clarifies the v3 indentation comment. |
| example/README.md | Repairs example commands and behavior descriptions. |
| example/node_programmatic_build/main.go | Applies output formatting during serialization. |
| example/node_load_strict_unmarshaler/main.go | Clarifies explicit strict-checking comments. |
| example/node_load_decode_comparison/main.go | Fixes Decode comparison and inline field handling. |
| example/node_dump_with_options/main.go | Demonstrates stored styles versus serialization options. |
| example/dumper_indent_comparison/main.go | Corrects printed execution commands. |
| docs/v3-to-v4-migration.md | Clarifies custom hooks and preferred line width. |
| docs/releases/v4.0.0.md | Adds the stable release announcement and adoption guidance. |
| docs/README.md | Updates the documentation index descriptions. |
| docs/plugin/README.md | Expands plugin links and distinguishes selection from registration. |
| docs/plugin/loader-limits.md | Explains depth and alias-work safety limits. |
| docs/plugin.md | Corrects plugin defaults, disabling semantics, and build guidance. |
| docs/options.md | Corrects defaults, examples, and configuration limitations. |
| docs/dev/README.md | Updates the internals guide description. |
| docs/dev/pipeline-overview.mmd | Clarifies unresolved node tags. |
| docs/dev/how-go-yaml-works.md | Corrects stage responsibilities and extension boundaries. |
| docs/dev/go-yaml-internals.md | Replaces outdated notes with current pipeline guidance. |
| docs/dev/dump-load-api.md | Updates compatibility guidance, error handling, and node examples. |
| docs/dev/call-hierarchy.mmd | Corrects method names and stage ownership. |
| doc.go | Recommends Load/Dump and clarifies compatibility defaults. |
| CONTRIBUTING.md | Repairs commands and documents release preparation. |
| cmd/go-yaml/yaml.go | Changes API terminology from deprecated to classic in comments. |
| cmd/go-yaml/README.md | Updates plugin semantics and JSON-comments build instructions. |
| cmd/go-yaml/main.go | Labels supported older APIs as classic in CLI help. |
| cmd/go-yaml/json.go | Changes Decoder terminology to classic in a comment. |
</details>
<sub>Review effort: Balanced</sub>
Approved these changes.
dims
ingydotnet
Present v4.0.0 as the stable release and describe all six plugin APIs. Correct option defaults, compatibility guidance, CLI help, and examples. Clarify external plugin builds and verify the JSON-comments command.
Replace obsolete architecture notes and repair documentation links and contributor commands.
Preserve the Loader-Limits guide after the deprecated API cleanup. Document current canonical output and YAML configuration limitations.
Validation: full tests, Go lint, YAML lint, formatting, and whitespace checks pass.
All 17 executable examples and 93 local documentation links were checked.
The YAML Test Suite retains its 66 known failures.