Skip to content

refactor: migrate YAML output from serde_yaml to noyalib - #87

Merged
canardleteer merged 8 commits into
mainfrom
migrate/noyalib
Jul 23, 2026
Merged

refactor: migrate YAML output from serde_yaml to noyalib#87
canardleteer merged 8 commits into
mainfrom
migrate/noyalib

Conversation

@canardleteer

Copy link
Copy Markdown
Owner

Summary

  • Replace deprecated serde_yaml with noyalib (serialize-only at runtime) for default CLI YAML output
  • Drop the transitive unsafe-libyaml dependency in favor of a pure-Rust YAML 1.2 library with a documented serde_yaml migration path
  • Add structural YAML unit tests that assert output shape via round-trip parsing, not exact quoting
  • Serialize semver components above i64::MAX as decimal strings so explain output stays valid under noyalib's integer limits
  • Update insta snapshots and select integration tests for cosmetic quote-style and trailing-newline changes

Test plan

  • cargo test passes
  • cargo build --release succeeds
  • unsafe-libyaml absent from Cargo.lock
  • Manual smoke: sem-tool validate 1.2.3, sem-tool explain 1.2.3-rc.1+meta
  • Output parses with yq

@canardleteer
canardleteer marked this pull request as draft June 23, 2026 04:19
@canardleteer

canardleteer commented Jun 23, 2026

Copy link
Copy Markdown
Owner Author

Related: sebastienrousseau/noyalib#117

Merged (takeover of 117): sebastienrousseau/noyalib#142

Replace the deprecated serde_yaml serializer with noyalib for CLI YAML
output, dropping unsafe-libyaml while keeping Serde-driven result types
unchanged. Add structural YAML unit tests and serialize semver components
above i64::MAX as decimal strings for noyalib compatibility.
Check in the proptest seed for semver components above i64::MAX so explain
YAML output stays covered after the noyalib migration.
Preserve legacy serde_yaml stdout formatting via noyalib SerializerConfig
tuning, a targeted requote pass, and trailing newlines, while keeping
semantic fixes such as large u64 semver components. Restores insta snapshots
and cli_select expectations to match main output exactly.
Share CLI insta cases across default (serde-yaml-compatability) and
native noyalib modes; run native snapshots in CI with --no-default-features.
Use a temporary git dependency with lossless-u64 until upstream MR lands;
serialize VersionExplanation components as YAML integers again.
Verify large semver components serialize as plain integer scalars and
round-trip through noyalib with lossless_u64_integers enabled.
Clearer name for the default legacy serde_yaml stdout cosmetics layer.
@canardleteer
canardleteer marked this pull request as ready for review July 23, 2026 14:36
@canardleteer
canardleteer merged commit 2e865c3 into main Jul 23, 2026
25 checks passed
@canardleteer
canardleteer deleted the migrate/noyalib branch July 23, 2026 14:47
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