Skip to content

fix(rust): replace unmaintained paste crate - #4183

Merged
chaokunyang merged 1 commit into
apache:mainfrom
mohitjoshi-hey:fix/rust-cargo-deny-pastey
Oct 16, 2026
Merged

chaokunyang merged 1 commit into
apache:mainfrom
mohitjoshi-hey:fix/rust-cargo-deny-pastey

Conversation

@mohitjoshi-hey

@mohitjoshi-hey mohitjoshi-hey commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Why?

cargo-deny reported the unmaintained paste crate (RUSTSEC-2024-0436) in the Rust dependency graph in issue #4182 .

What does this PR do?

  • Replaces the unmaintained paste package with the maintained pastey package through Cargo package renaming.
  • Keeps the local dependency name as paste, so the existing $crate::paste::paste! macro calls remain unchanged.
  • Changes only rust/fory-core/Cargo.toml.
  • No serializer, generated-code, protocol, runtime, or public API source files were changed.

Validation:

  • cargo test -p fory-core trait_visibility_forms_compile -- --nocapture — passed (1 passed, 0 failed).
  • cargo clippy --workspace --all-features --all-targets -- -D warnings — passed.
  • cargo tree --workspace | Select-String "paste" — shows pastey v0.2.3 and no paste crate.
  • cargo deny check — reports advisories ok, bans ok, and sources ok. The overall command reports license failures because this checkout has no deny.toml and cargo-deny uses its default license policy.
  • cargo test --workspace — all crates compiled, but one unrelated existing test, types::temporal::tests::std_time_conversions, failed in rust/fory-core/src/types/temporal.rs.

Result:
Screenshot 2026-10-16 040523
Screenshot 2026-10-16 040516

Related issues

Fixes #4182

AI Contribution Checklist

  • Substantial AI assistance was used in this PR: yes
  • If yes, I included a completed AI Contribution Checklist and the required AI Usage Disclosure.
  • If yes, my PR description includes the required ai_review summary and final clean review evidence from both required reviewers.

AI Usage Disclosure

  • substantial_ai_assistance: yes
  • scope: dependency migration, validation commands, and PR description drafting
  • affected_files_or_subsystems: rust/fory-core/Cargo.toml
  • ai_review: Not completed yet
  • ai_review_artifacts: Not available yet
  • human_verification: Focused macro test passed, Clippy passed, and dependency tree confirmed pastey with no paste.
  • performance_verification: Not applicable; this is a manifest-only dependency replacement.
  • provenance_license_confirmation: No source code was copied from third parties. The replacement dependency uses the maintained pastey package.

Completed AI Review Checklist

  • Substantial AI assistance was used in this PR: yes
  • If yes, I included the standardized AI Usage Disclosure block above.
  • If yes, I can explain and defend all important changes without AI help.
  • If yes, I reviewed AI-assisted code changes line by line before submission.
  • If yes, I completed line-by-line self-review first and fixed issues before requesting AI review.
  • If yes, I ran two fresh AI review agents on the current PR diff or current HEAD after the latest code changes: one Fory-guided reviewer and one independent general reviewer.
  • If yes, I addressed all actionable AI review comments and repeated the review loop until both AI reviewers reported no further actionable comments.
  • If yes, I attached screenshot evidence or equivalent persisted links of the final clean-review results from both reviewers in this PR body.
  • If yes, I ran a focused test command and recorded its result above.
  • If yes, I added regression tests for the reported issue.
  • If yes, I validated protocol and performance impacts; no binary protocol change was introduced.
  • If yes, I verified licensing and provenance compliance.

Does this PR introduce any user-facing change?

This PR does not introduce any user-facing behavior, public API, or binary protocol changes.

  • Does this PR introduce any public API change?
  • Does this PR introduce any binary protocol compatibility change?

Benchmark

Not applicable. This is a manifest-only dependency replacement and does not change serialization logic or runtime behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

@chaokunyang chaokunyang left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@chaokunyang
chaokunyang merged commit 7e9d416 into apache:main Oct 16, 2026
64 checks passed
@mohitjoshi-hey

Copy link
Copy Markdown
Contributor Author

Thanks!

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.

[Rust] cargo-deny reported issues

2 participants