Skip to content

fix(analyzer): replace serde_yaml with yaml_serde - #361

Merged
Teakowa merged 2 commits into
mainfrom
codex/issue-358
Sep 16, 2026
Merged

Teakowa merged 2 commits into
mainfrom
codex/issue-358

Conversation

@e54-bot

@e54-bot e54-bot commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • replace the archived serde_yaml workspace dependency with the maintained yaml_serde fork from the YAML Organization
  • update declarative rule and project lint configuration parsing to use the replacement
  • add focused YAML contract coverage for supported rule/config inputs, round-trip serialization, registry behavior, and explicit invalid-input failures

Fixes #358

Verification

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • cargo test --workspace --all-targets --all-features
  • cargo test -p wright-analyzer --test yaml_contract
  • confirmed no serde_yaml or unsafe-libyaml dependency/call site remains
  • independent ablation restored the old dependency and observed serde_yaml v0.9.34+deprecated in the dependency graph

@Teakowa Teakowa 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.

crates/wright-analyzer/tests/yaml_contract.rs: most of this new contract suite duplicates the existing analyzer coverage established by #310 — declarative YAML loading/execution, project config parsing/options, severity behavior, and unknown-option rejection are already protected in tests/registry.rs. #358 allows adding or retaining focused compatibility coverage, so the parser swap does not justify a second end-to-end copy of the same contract without an independent failure mode. This adds maintenance cost and can let the two suites drift while testing the same assumptions. Please remove the duplicated cases and keep only migration-specific coverage that exercises a genuinely uncovered YAML behavior, if any.

@e54-bot

e54-bot commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator Author

已根据 review 修正:

  • 删除与既有 registry contract 重复的 rule shape、registry execution、severity 和 unknown-option 覆盖。
  • 保留 LintConfig YAML 序列化往返,以及 RuleDefinition invalid YAML 的 Wright-level 错误上下文两项独立契约。
  • focused YAML tests 2/2、workspace clippy 和 workspace tests 均通过。

修正提交:36b73c2,请重新 review。

@e54-bot
e54-bot requested a review from Teakowa September 16, 2026 14:45

@Teakowa Teakowa 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.

LGTM

@Teakowa
Teakowa merged commit 58c868d into main Sep 16, 2026
18 checks passed
@Teakowa
Teakowa deleted the codex/issue-358 branch September 16, 2026 15:27
@github-project-automation github-project-automation Bot moved this from Backlog to Done in Make Workshop Great Again Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

Replace unmaintained serde_yaml dependency without changing Wright YAML contracts

2 participants