Repository navigation
#530 [deps] serde_yaml 0.9 を yaml_serde 0.10.7 へ移行し、RUSTSEC-2024-0449 の一時除外を外す - #664
Merged
Merged
Conversation
Replace the unmaintained serde_yaml 0.9 (unsafe-libyaml, RUSTSEC-2024-0449) with yaml_serde 0.10.7 (libyaml-rs) while keeping the dependency name `serde_yaml`, so no production source changes. Remove the temporary RUSTSEC-2024-0449 advisory exclusion now that the crate is gone. Add the issue530-yaml-migration corpus (expectations.toml + fixtures/compatibility.json) and tests/issue530_yaml_migration.rs, which drive the public API over the pre-migration measurements: pack parser/schema accept-reject parity (unknown field, duplicate key, tag, anchor/alias, merge, multi-document, non-string key), plan diagnostics with line/column, workflow version numeric values, scrub type/element-count/key-collision, and the size, depth, sequence, and scalar limits. 計測: base f1c4207 の src/ の serde_yaml 参照は 16 ファイル・140 行・ 149 token で、Issue #530 の H-24 調査と一致する。 判断: keep `version = "0.10.7"` as the Issue wrote and pin the resolved version with Cargo.lock. 判断: revert an incidental windows-sys bump that `cargo update -p serde_yaml` introduced for is_executable; the lock diff stays limited to removing serde_yaml/unsafe-libyaml and adding yaml_serde/libyaml-rs. 読み替え: register the corpus case as a non-Next.js directory (like issue513), so the generic corpus discovery picks up expectations.toml and fixture_contains. Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
保守されていない YAML parser(
serde_yaml0.9 →unsafe-libyaml0.2.11、RUSTSEC-2024-0449)を、YAML 組織が保守するyaml_serde0.10.7(libyaml-rs0.3.0)へ移します。依存名をserde_yamlのまま package rename で入れるので、src/は変えていません。PR #663 で入れた一時的な advisory の除外を、この PR で外します。Refs #530
変更(6 ファイル、+550 −28、1 commit)
Cargo.toml:serde_yaml = { package = "yaml_serde", version = "0.10.7" }。依存名はserde_yamlのままです。Cargo.lock:差は次の 4 つだけです。serde_yaml0.9.34+deprecated、unsafe-libyaml0.2.11yaml_serde0.10.7、libyaml-rs0.3.0cargo updateで一緒に上がったwindows-sysは戻しました。deny.toml:RUSTSEC-2024-0449 の一時除外とその説明を外し、ignore = []にしました。ほかの監査の設定とライセンスの許可は変えていません。tests/issue530_yaml_migration.rs(新規、5 本)と corpustests/corpus/apps/issue530-yaml-migration/(expectations.toml・fixtures/compatibility.json)。旧版で測った結果を期待値に記録し、公開 API で確かめます。serde_yamlは dev-dependency にも残していません。既存の YAML fixture と証跡は変えていません。成長上限のファイルと baseline も変えていません。src/の中のserde_yamlの参照は、basef1c42074で 16 ファイル・140 行です。rename なので、どれも変更は要りません。検証(HEAD
b0b20197)commandmate verifyで 15/15 passed でした(fmt、clippy、cargo test --all-targets、CI の形の ruff、tests/eval、npm ci などを含みます)。cargo deny check(除外なし):exit 0。advisories・bans・licenses・sources の 4 つとも ok です。cargo-zigbuild clippy --all-targets --target x86_64-unknown-linux-gnuは exit 0 でした。f1c42074のdeny.tomlから除外だけを外すと、cargo deny check advisoriesが RUSTSEC-2024-0449 で落ちます(exit 1)。この PR の HEAD では、除外なしで通ります。tag-rejectedの受理、scrub の mapping の要素数、duplicate key の診断の列番号)。rust-version = "1.88"に対し、yaml_serde0.10.7 のrust-versionは 1.82 です。確かめてほしい点
guifeature での build は手元で流していません(15 ゲートは既定の feature で、toolchain は stable)。libyaml-rsは、archived のunsafe-libyamlを YAML 組織が引き継いだ unsafe Rust の fork です。safe Rust の parser への置き換えではありません(Issue 本文の「移行先と理由」のとおりです)。🤖 Generated with Claude Code