Skip to content

Replace deprecated serde_yaml with serde-saphyr in compiletest - #5012

Open
jadhavgaurav wants to merge 1 commit into
model-checking:mainfrom
jadhavgaurav:replace-serde-yaml-5000
Open

jadhavgaurav wants to merge 1 commit into
model-checking:mainfrom
jadhavgaurav:replace-serde-yaml-5000

Conversation

@jadhavgaurav

Copy link
Copy Markdown

Resolves #5000

serde_yaml is deprecated and pulls in unsafe-libyaml (RUSTSEC-2024-0449). compiletest only used it to read the config.yml of exec-mode tests. This PR switches that one call to serde-saphyr (the crate the advisory suggests) and removes the advisory entry from deny.toml.

Changes:

  • tools/compiletest: serde_yaml replaced by serde-saphyr with only the deserialize feature (no serializer, so fewer transitive crates). The call site is the same from_reader into ExecConfig, and the "couldn't parse config.yml" error path is unchanged.
  • deny.toml: removed the RUSTSEC-2024-0449 ignore. Added a license exception for encoding_rs (BSD-3-Clause), which serde-saphyr needs for input decoding. It has the same shape as the existing foldhash exception, and compiletest is not shipped.
  • Cargo.lock updated accordingly.

Testing done by hand:

  • cargo build -p compiletest on the pinned nightly succeeds.
  • Parsed all 98 config.yml files under tests/ with both serde_yaml 0.9 and serde-saphyr into the same struct as ExecConfig: all parse, and the results are identical.

Not run locally: cargo deny check (cargo-deny is not installed here), so the advisory removal and the new license exception rely on CI to confirm. I also did not run the full exec-mode suites, which need a built Kani.

AI assistance: this change was prepared with an AI coding assistant and reviewed and tested by me.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.

serde_yaml is deprecated and pulls in the unmaintained unsafe-libyaml
(RUSTSEC-2024-0449). Parse the exec-mode config.yml with serde-saphyr
instead and drop the matching deny.toml advisory ignore.

encoding_rs (BSD-3-Clause, via serde-saphyr) gets a license exception
since compiletest is not shipped.

Resolves model-checking#5000

Signed-off-by: Gaurav Jadhav <gaurav.vjadhav01@gmail.com>
@jadhavgaurav
jadhavgaurav requested review from a team as code owners October 16, 2026 04:22
@github-actions github-actions Bot added Z-EndToEndBenchCI Tag a PR to run benchmark CI Z-CompilerBenchCI Tag a PR to run benchmark CI labels Oct 16, 2026
@feliperodri
feliperodri requested a balanced review from Copilot October 16, 2026 07:31

Copilot AI 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.

🟢 Approval recommended

The migration is narrowly scoped to test tooling, preserves configuration handling, and has no identified blocking issues.

0 open findings

What changed in this PR

Replaces compiletest’s deprecated YAML parser with serde-saphyr, removing the dependency behind issue #5000 without changing configuration error handling.

Changes:

  • Uses serde-saphyr with deserialization only.
  • Removes the obsolete advisory ignore and adds an encoding_rs license exception.
  • Updates the dependency lockfile.
File Description
tools/​compiletest/​src/​runtest.rs Switches the configuration parser.
tools/​compiletest/​Cargo.toml Replaces the YAML dependency.
deny.toml Updates advisory and license policy.
Cargo.lock Records replacement dependencies and removes the deprecated parser.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Z-CompilerBenchCI Tag a PR to run benchmark CI Z-EndToEndBenchCI Tag a PR to run benchmark CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move compiletest off the deprecated serde_yaml

2 participants