Skip to content

fix: stop depending on unmaintained/unsound serde_yml - #1080

Merged
CppCXY merged 1 commit into
EmmyLuaLs:mainfrom
mrcjkb:mj/push-uorxxkqtkrxu
May 14, 2026
Merged

CppCXY merged 1 commit into
EmmyLuaLs:mainfrom
mrcjkb:mj/push-uorxxkqtkrxu

Conversation

@mrcjkb

@mrcjkb mrcjkb commented May 13, 2026

Copy link
Copy Markdown
Contributor

The serde_yml repository has been archived and is unmaintained. This PR replaces it with the maintained serde_yaml_ng crate.

See also: https://users.rust-lang.org/t/serde-and-yaml-support-status/125684/2

@github-actions

Copy link
Copy Markdown

Code Review Summary

This PR replaces the serde_yml crate (v0.0.12) with serde_yaml_ng (v0.10.0) across the entire project. The changes appear to be a straightforward dependency migration.

Potential Issues:

  1. API Compatibility Risk

    • While both crates implement serde::Deserialize, serde_yaml_ng may have subtle behavioral differences in YAML parsing (e.g., handling of duplicate keys, anchors, or type coercion). Consider verifying that all YAML files parse identically.
  2. Removed Dependencies

    • anyhow and libyml are no longer needed (previously transitive dependencies of serde_yml). Ensure no other parts of the codebase depend on these crates directly.
  3. Version Bump

    • serde_yaml_ng v0.10.0 is a major version jump from serde_yml v0.0.12. Verify that the new crate's API surface matches exactly (the code changes suggest it does, but double-check for any removed/replaced methods).

Recommendations:

  1. Run Full Test Suite

    • Execute all tests, especially those involving YAML parsing (e.g., std_i18n tests, formatter config parsing).
  2. Check for Deprecation Warnings

    • Run cargo build with RUSTFLAGS="-D warnings" to catch any deprecation notices from the new crate.
  3. Verify YAML Compatibility

    • Test with edge cases: empty files, files with comments, multi-document YAML, and files using YAML 1.2 features.
  4. Consider Pinning Minor Version

    • serde_yaml_ng = "0.10" allows minor version bumps. Consider "=0.10.0" for reproducibility, or at least "0.10" (which allows 0.10.x but not 0.11).

Overall Assessment:

The migration appears correct and well-executed. The changes are consistent across all affected files. No syntax errors or obvious logic issues. Approved with the above recommendations for safety.

@xuhuanzy

Copy link
Copy Markdown
Member

Do not update dependencies unless necessary, and serde-yaml is sufficient for use.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request replaces the serde_yml dependency with serde_yaml_ng across the entire project, including the formatter, language server, and internal tools. The changes involve updating Cargo.toml and Cargo.lock files and migrating all YAML parsing calls in the source code to the new library. I have no feedback to provide as there were no review comments to assess.

@mrcjkb

mrcjkb commented May 13, 2026 •

Copy link
Copy Markdown
Contributor Author

Do not update dependencies unless necessary, and serde-yaml is sufficient for use.

This project isn't depending on serde-yaml, it's depending on serde-yml, an AI slop fork of serde-yaml that was archived because it received huge backlash from the original serde-yaml author. See also: https://xcancel.com/davidtolnay/status/1883906113428676938

I would regard this as a potentially major security concern.

The serde_yml crate is a fork of a high-quality but unmaintained library. In the fork, the AI has taken initiative to add a big heap of stuff that is variously complete nonsense (docs.rs/serde_yml/0.0.11/ser…, docs.rs/serde_yml/0.0.11/src…) or unsound (docs.rs/serde_yml/0.0.11/ser…). On top of this, the crate's documentation has been broken in docs·rs for the last 5 months because AI hallucinated a nonexistent rustdoc flag into the crate's configuration.

image

Anything with a legacy from libyaml should be regarded as defective. It is no longer developed and there is a high severity security vulnerability that the maintainers have kept private for 10 months.

@mrcjkb mrcjkb changed the title fix: stop depending on unmaintained serde_yml fix: stop depending on unmaintained/unsound serde_yml May 13, 2026
@CppCXY
CppCXY merged commit d3255a3 into EmmyLuaLs:main May 14, 2026
17 checks passed
@mrcjkb
mrcjkb deleted the mj/push-uorxxkqtkrxu branch May 14, 2026 06:37
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.

3 participants