Skip to content

chore: replace deprecated serde_yaml with serde_yml#450

Open
anshul-garg27 wants to merge 3 commits intogoogleworkspace:mainfrom
anshul-garg27:chore/replace-deprecated-serde-yaml
Open

chore: replace deprecated serde_yaml with serde_yml#450
anshul-garg27 wants to merge 3 commits intogoogleworkspace:mainfrom
anshul-garg27:chore/replace-deprecated-serde-yaml

Conversation

@anshul-garg27
Copy link
Contributor

Summary

  • Replace serde_yaml = "0.9.34" with serde_yml = "0.0" in Cargo.toml
  • Update 4 call sites in src/generate_skills.rs from serde_yaml::from_str to serde_yml::from_str

Why

serde_yaml is deprecated by its author — the version string in Cargo.lock shows 0.9.34+deprecated. The crate will not receive security fixes or maintenance updates.

serde_yml is the actively maintained community fork with an identical from_str API, making this a drop-in replacement.

Test plan

  • All 4 call sites updated
  • No other serde_yaml references remain in src/
  • Existing generate-skills tests continue to pass

serde_yaml 0.9.34 is marked as deprecated by its author (the version
string in Cargo.lock shows +deprecated). Replace with serde_yml which
is the actively maintained community fork with the same API.

Only 4 call sites in generate_skills.rs — drop-in replacement.
@changeset-bot
Copy link

changeset-bot bot commented Mar 12, 2026

🦋 Changeset detected

Latest commit: 606f248

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@googleworkspace/cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses the deprecation of the serde_yaml crate by migrating to its actively maintained community fork, serde_yml. This change ensures the project relies on a supported library for YAML serialization and deserialization, preventing potential security vulnerabilities and maintenance issues. The migration involved updating the project's dependencies and adjusting the relevant code calls to the new crate, which offers an identical API for a seamless transition.

Highlights

  • Dependency Update: Replaced the deprecated serde_yaml crate with serde_yml in Cargo.toml to ensure continued maintenance and security updates.
  • Code Migration: Updated four call sites in src/generate_skills.rs to use serde_yml::from_str instead of serde_yaml::from_str, reflecting the dependency change.
Changelog
  • .changeset/chore-replace-serde-yaml.md
    • Added a new changeset file for this chore.
  • Cargo.toml
    • Replaced serde_yaml with serde_yml as a dependency.
    • Updated the version of serde_yml to 0.0.
  • src/generate_skills.rs
    • Updated serde_yaml::from_str calls to serde_yml::from_str in handle_generate_skills function for persona and recipe registries.
    • Modified serde_yaml::from_str calls to serde_yml::from_str within the test_registry_references test function.
Activity
  • No specific activity (comments, reviews, or progress updates) was provided in the context.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Generative AI Prohibited Use Policy, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request correctly replaces the deprecated serde_yaml crate with its maintained community fork, serde_yml. The changes are straightforward and correctly applied at all call sites. My main feedback is regarding the version specification for serde_yml in Cargo.toml. Using "0.0" is too broad and could lead to future build issues. I've suggested a more specific version to improve dependency stability.

Address Gemini review: "0.0" is too broad and acts like a wildcard.
Pin to the exact minor version 0.0.12 for predictable builds.
@googleworkspace-bot
Copy link
Collaborator

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request correctly replaces the deprecated serde_yaml crate with its maintained fork, serde_yml. This is a necessary maintenance update to ensure the project uses supported dependencies. The changes are applied consistently across the codebase. My review includes suggestions to improve error handling at the parsing call sites. By logging the specific parsing errors instead of a generic warning, debugging potential issues with the YAML files will be much easier, improving the tool's overall maintainability.

The else branches for personas.yaml and recipes.yaml parsing now
include the actual error message (e.g. line/column info), making
debugging much easier if the YAML ever has a syntax issue.
@googleworkspace-bot
Copy link
Collaborator

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request replaces the serde_yaml crate with serde_yml across the project. This change includes updating the Cargo.toml dependency and modifying all serde_yaml::from_str calls in src/generate_skills.rs and its tests to use serde_yml::from_str. Additionally, error handling for YAML parsing failures in src/generate_skills.rs was enhanced to print the specific error message.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants