Skip to content

Conversation

@joshlf
Copy link
Member

@joshlf joshlf commented Jan 21, 2026

Closes #2903


Latest Update: v5 — Compare vs v4

📚 Full Patch History

Links show the diff between the row version and the column version.

Version v4 v3 v2 v1 Base
v5 vs v4 vs v3 vs v2 vs v1 vs Base
v4 vs v3 vs v2 vs v1 vs Base
v3 vs v2 vs v1 vs Base
v2 vs v1 vs Base
v1 vs Base

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @joshlf, 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 significantly improves the developer experience for maintaining zerocopy-derive tests by implementing an automated 'blessing' system. This system allows developers to easily regenerate and update the expected output of derive macros, eliminating the need for manual updates and reducing the chance of errors when macro expansions change. The change centralizes the update process for various test outputs into a single, more descriptive script.

Highlights

  • Automated Test Output Blessing: Introduced a new mechanism to automatically 'bless' (update) the expected output files for zerocopy-derive tests. This is similar to how trybuild handles UI tests, simplifying the process of updating expected macro expansion output.
  • Script Renaming and Expansion: The tools/update-ui-test-files.sh script has been renamed to tools/update-expected-test-output.sh and its functionality expanded to include the blessing of zerocopy-derive output tests in addition to UI tests.
  • Documentation Update: The agent_docs/ui_tests.md documentation has been updated to reflect the new script name and its broader scope, now covering both UI and derive output tests.
  • Code Formatting Consistency: Several .expected.rs files in zerocopy-derive/src/output_tests/expected/ received minor whitespace and formatting adjustments, likely as a result of the new pretty-printing logic applied during the blessing process.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

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 Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, 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 introduces a valuable enhancement to the testing workflow by adding a "blessing" mechanism for derive macro output tests. The changes are well-implemented, using an environment variable (ZEROCOPY_BLESS) to toggle between test execution and updating expected output files. The use of prettyplease to normalize both actual and expected outputs is a great practice that makes the tests more robust and less brittle to formatting changes. The related documentation and scripts have been updated accordingly. Overall, this is a solid improvement that will enhance developer productivity and test maintainability.

@joshlf joshlf force-pushed the Gd828ec01c10bd743decbefc4946c3ea5db686237 branch from 7b542a6 to c90cd87 Compare January 21, 2026 20:05
@joshlf joshlf force-pushed the G66ceda30436ea649540ec804dc64926483988008 branch from 539552e to abc3d6f Compare January 21, 2026 20:05
@joshlf joshlf requested a review from jswrenn January 21, 2026 20:08
@codecov-commenter
Copy link

codecov-commenter commented Jan 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.90%. Comparing base (05ae8da) to head (49e1b08).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2905   +/-   ##
=======================================
  Coverage   91.90%   91.90%           
=======================================
  Files          20       20           
  Lines        5877     5877           
=======================================
  Hits         5401     5401           
  Misses        476      476           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@joshlf joshlf force-pushed the Gd828ec01c10bd743decbefc4946c3ea5db686237 branch from c90cd87 to 92645fe Compare January 22, 2026 16:18
@joshlf joshlf force-pushed the G66ceda30436ea649540ec804dc64926483988008 branch from abc3d6f to 85454ad Compare January 22, 2026 16:18
@joshlf joshlf force-pushed the Gd828ec01c10bd743decbefc4946c3ea5db686237 branch from 92645fe to 0b93e1a Compare January 22, 2026 16:19
@joshlf joshlf force-pushed the G66ceda30436ea649540ec804dc64926483988008 branch from 85454ad to 5589919 Compare January 22, 2026 16:19
Base automatically changed from G66ceda30436ea649540ec804dc64926483988008 to main January 22, 2026 17:12
Closes #2903

gherrit-pr-id: Gd828ec01c10bd743decbefc4946c3ea5db686237
@joshlf joshlf force-pushed the Gd828ec01c10bd743decbefc4946c3ea5db686237 branch from 0b93e1a to 49e1b08 Compare January 22, 2026 17:16
@joshlf joshlf enabled auto-merge January 22, 2026 17:17
@joshlf joshlf added this pull request to the merge queue Jan 22, 2026
Merged via the queue into main with commit 5c67d2c Jan 22, 2026
115 of 122 checks passed
@joshlf joshlf deleted the Gd828ec01c10bd743decbefc4946c3ea5db686237 branch January 22, 2026 18:02
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.

Store derive output test goldens in separate files

3 participants