Skip to content

Replace deprecated serde_yaml with serde_yaml_ng - #3989

Open
Matei02355 wants to merge 3 commits into
sharkdp:masterfrom
Matei02355:maintained-yaml-3164-20260907
Open

Replace deprecated serde_yaml with serde_yaml_ng#3989
Matei02355 wants to merge 3 commits into
sharkdp:masterfrom
Matei02355:maintained-yaml-3164-20260907

Conversation

@Matei02355

Copy link
Copy Markdown
Contributor

The serde_yaml crate is deprecated. Switch the direct dependency to the published serde_yaml_ng 0.10.0 release through a Cargo dependency alias, keeping existing serialization call sites and the cache metadata format.

Add regression coverage for legacy timestamps and version compatibility, null values and unknown fields, YAML aliases and JSON input, and malformed YAML with an existing cache. The SerdeYamlError variant remains available and still reports parse locations; its wrapped error now comes from the replacement crate. Syntect's separate YAML parser is unchanged.

Validation: 477 tests passed with all features (7 ignored), Clippy with warnings denied and formatting passed, and the library builds without default features using regex-onig. Actual caches built with the old serializer were read by the updated binary and caches built with the updated binary were read by the old binary. The new lockfile checksum matches the published crates.io archive.

Fixes #3164.

@Matei02355
Matei02355 marked this pull request as ready for review September 7, 2026 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

serde_yaml is deprecated

1 participant