Skip to content

chore(deps): replace deprecated serde_yaml with serde_norway - #439

Merged
smith-and-web merged 2 commits into
mainfrom
claude/nervous-fermi-f62b01
Nov 6, 2026
Merged

smith-and-web merged 2 commits into
mainfrom
claude/nervous-fermi-f62b01

Conversation

@smith-and-web

Copy link
Copy Markdown
Owner

Summary

  • Replaces serde_yaml 0.9.34, which is deprecated and depends on the unmaintained unsafe-libyaml (RUSTSEC-2024-0449), with serde_norway 0.9.42. serde_norway is a maintained fork built on unsafe-libyaml-norway, which has no advisories.
  • Renames serde_yaml:: to serde_norway:: at 25 call sites in parsers/longform.rs, parsers/markdown.rs and commands/export.rs. No logic changes.

Crate choice

Crate RustSec Notes
serde_yml RUSTSEC-2025-0068 (unsound) Repository archived
serde_yaml_ng — Still depends on unsafe-libyaml, so 0449 would remain
serde_norway none Same API; parser and emitter source matches serde_yaml apart from let-else refactors

Round-trip compatibility

A scratch binary compared serde_yaml 0.9.34 with serde_norway 0.9.42 on scene-style frontmatter (wikilinks, quotes, colons, multiline, unicode, #/- prefixes, numeric strings, flattened maps). Three outputs were checked:

  • Emitted YAML
  • Re-emitted YAML after parsing anchors, block and folded scalars, and nested sequences
  • Error text for malformed input

All three were byte-identical.

Test plan

  • cargo test --all-features: 653 passed
  • cargo clippy --all-targets --all-features -- -D warnings: clean
  • cargo fmt --all -- --check: clean
  • cargo audit no longer lists RUSTSEC-2024-0449 (11 allowed warnings, down from 12)

Note: on this branch, cargo audit still reports the 6 vulnerabilities that #438 fixes. The Security Audit check will fail here until #438 is merged into main.

🤖 Generated with Claude Code

smith-and-web and others added 2 commits November 6, 2026 13:31
serde_yaml 0.9.34 is deprecated and pulls in unsafe-libyaml, which is
unmaintained (RUSTSEC-2024-0449). serde_norway is a maintained fork with
the same API and an identical parser and emitter, built on
unsafe-libyaml-norway, which has no advisories.

serde_yml was ruled out as unsound (RUSTSEC-2025-0068), and serde_yaml_ng
still depends on unsafe-libyaml.

Frontmatter round-trip is unchanged: emitted, re-emitted and error output
were compared byte-for-byte against serde_yaml.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@smith-and-web
smith-and-web merged commit f15ae3b into main Nov 6, 2026
16 checks passed
@smith-and-web
smith-and-web deleted the claude/nervous-fermi-f62b01 branch November 6, 2026 19: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.

1 participant