Skip to content

Conversation

@joshlf
Copy link
Member

@joshlf joshlf commented Jan 16, 2026


Latest Update: v21 — Compare vs v20

📚 Full Patch History

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

Version v20 v19 v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v21 v20 v19 v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v20 v19 v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v19 v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v8 v7 v6 v5 v4 v3 v2 v1 Base
v7 v6 v5 v4 v3 v2 v1 Base
v6 v5 v4 v3 v2 v1 Base
v5 v4 v3 v2 v1 Base
v4 v3 v2 v1 Base
v3 v2 v1 Base
v2 v1 Base
v1 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 refactors the zerocopy-derive crate by extracting the logic for building unsafe impl blocks into a dedicated ImplBlockBuilder struct. This change aims to improve the modularity and maintainability of the derive macro implementation by centralizing the generation of common code structures, making the macro code cleaner and more reusable.

Highlights

  • New ImplBlockBuilder Struct: Introduced a new ImplBlockBuilder struct in zerocopy-derive/src/util.rs to encapsulate the logic for constructing unsafe impl blocks, centralizing this common code generation pattern.
  • Builder Initialization: The ImplBlockBuilder includes a from_derive_input constructor, simplifying its instantiation by taking a Ctx, DeriveInput, and trait Path to extract necessary generic parameters.
  • TokenStream Generation: A build method was added to ImplBlockBuilder which generates the proc_macro2::TokenStream representing the complete unsafe impl block, including handling of impl_generics, trait_name, self_name, self_generics, and where_clause.
  • Dependency Updates: Updated imports in zerocopy-derive/src/util.rs to include quote macro and additional syn types such as ImplGenerics, TypeGenerics, and WhereClause to support the new builder.

🧠 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 begins the work of refactoring the unsafe impl block generation into a dedicated ImplBlockBuilder. The new builder is a good step towards simplifying the derive macro logic.

My review includes a couple of suggestions for the new ImplBlockBuilder:

  • A high-severity comment regarding the type used for trait generics, which appears to be incorrect and could lead to issues. I've also suggested making the builder more flexible by allowing trait generics to be set.
  • A medium-severity style suggestion to make the build method more idiomatic and concise.

Overall, this is a promising start to the refactoring effort.

@codecov-commenter
Copy link

codecov-commenter commented Jan 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.90%. Comparing base (c97f53b) to head (2e540b1).

Additional details and impacted files
@@                            Coverage Diff                             @@
##           G9c0c3d07b59c78d561a16ab42bfe6eacaadd7156    #2893   +/-   ##
==========================================================================
  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 G0662505d5901f5c3cd21b16c314b9f3f8dc817a6 branch from c6141ac to 52dc827 Compare January 16, 2026 22:11
@joshlf joshlf force-pushed the G4fbec16c9f8d3c8051208f250d9ad871a648e668 branch 2 times, most recently from 4057000 to 60ef83f Compare January 17, 2026 00:51
@joshlf joshlf force-pushed the G0662505d5901f5c3cd21b16c314b9f3f8dc817a6 branch 2 times, most recently from 9fcaf05 to 6ebdd8e Compare January 20, 2026 16:15
@joshlf joshlf force-pushed the G4fbec16c9f8d3c8051208f250d9ad871a648e668 branch from 60ef83f to 0c4c023 Compare January 20, 2026 16:15
Base automatically changed from G0662505d5901f5c3cd21b16c314b9f3f8dc817a6 to main January 20, 2026 17:15
@joshlf joshlf force-pushed the G4fbec16c9f8d3c8051208f250d9ad871a648e668 branch 2 times, most recently from 3f812f3 to cb0ab25 Compare January 20, 2026 18:59
@joshlf joshlf changed the base branch from main to G3cb376b3f2d996151636f7aebb3a33f4134162e6 January 20, 2026 18:59
@joshlf joshlf force-pushed the G4fbec16c9f8d3c8051208f250d9ad871a648e668 branch from cb0ab25 to 8e47e17 Compare January 20, 2026 19:00
@joshlf joshlf force-pushed the G3cb376b3f2d996151636f7aebb3a33f4134162e6 branch from cf6fc99 to 2b225f6 Compare January 20, 2026 19:00
@joshlf joshlf force-pushed the G4fbec16c9f8d3c8051208f250d9ad871a648e668 branch from 8e47e17 to 075da74 Compare January 20, 2026 19:16
@joshlf joshlf force-pushed the G3cb376b3f2d996151636f7aebb3a33f4134162e6 branch from 2b225f6 to c4ce261 Compare January 20, 2026 19:16
@joshlf joshlf force-pushed the G4fbec16c9f8d3c8051208f250d9ad871a648e668 branch from 075da74 to 8fe9f03 Compare January 20, 2026 19:24
@joshlf joshlf force-pushed the G3cb376b3f2d996151636f7aebb3a33f4134162e6 branch from c4ce261 to 3d85180 Compare January 20, 2026 19:24
@joshlf joshlf force-pushed the G4fbec16c9f8d3c8051208f250d9ad871a648e668 branch from 8fe9f03 to 475dccc Compare January 20, 2026 19:30
@joshlf joshlf force-pushed the G3cb376b3f2d996151636f7aebb3a33f4134162e6 branch 2 times, most recently from f51bd71 to 20ce37d Compare January 20, 2026 19:34
@joshlf joshlf force-pushed the G4fbec16c9f8d3c8051208f250d9ad871a648e668 branch 2 times, most recently from 1184e6c to 4836ca9 Compare January 20, 2026 19:56
@joshlf joshlf force-pushed the G3cb376b3f2d996151636f7aebb3a33f4134162e6 branch from 20ce37d to 0b24253 Compare January 20, 2026 19:57
@joshlf joshlf force-pushed the G3cb376b3f2d996151636f7aebb3a33f4134162e6 branch from 0b24253 to fd8b585 Compare January 20, 2026 20:00
@joshlf joshlf force-pushed the G4fbec16c9f8d3c8051208f250d9ad871a648e668 branch from 4836ca9 to b544d00 Compare January 20, 2026 20:00
@joshlf joshlf force-pushed the G3cb376b3f2d996151636f7aebb3a33f4134162e6 branch from fd8b585 to dc2b099 Compare January 20, 2026 20:21
@joshlf joshlf force-pushed the G4fbec16c9f8d3c8051208f250d9ad871a648e668 branch from b544d00 to 219d22b Compare January 20, 2026 20:21
@joshlf joshlf force-pushed the G3cb376b3f2d996151636f7aebb3a33f4134162e6 branch from dc2b099 to 0944d15 Compare January 20, 2026 20:26
@joshlf joshlf force-pushed the G4fbec16c9f8d3c8051208f250d9ad871a648e668 branch from 219d22b to 6da2d96 Compare January 20, 2026 20:26
@joshlf joshlf force-pushed the G3cb376b3f2d996151636f7aebb3a33f4134162e6 branch from 0944d15 to 4479318 Compare January 20, 2026 20:30
@joshlf joshlf force-pushed the G4fbec16c9f8d3c8051208f250d9ad871a648e668 branch 2 times, most recently from 1bad81e to b047c2a Compare January 20, 2026 20:35
@joshlf joshlf force-pushed the G3cb376b3f2d996151636f7aebb3a33f4134162e6 branch from 4479318 to 75c1680 Compare January 20, 2026 20:35
Base automatically changed from G3cb376b3f2d996151636f7aebb3a33f4134162e6 to main January 20, 2026 21:26
@joshlf joshlf force-pushed the G4fbec16c9f8d3c8051208f250d9ad871a648e668 branch 2 times, most recently from f480e74 to 30d3f53 Compare January 20, 2026 23:17
@joshlf joshlf changed the base branch from main to G9c0c3d07b59c78d561a16ab42bfe6eacaadd7156 January 20, 2026 23:17
gherrit-pr-id: G4fbec16c9f8d3c8051208f250d9ad871a648e668
@joshlf joshlf force-pushed the G4fbec16c9f8d3c8051208f250d9ad871a648e668 branch from 30d3f53 to 2e540b1 Compare January 20, 2026 23:31
@joshlf joshlf force-pushed the G9c0c3d07b59c78d561a16ab42bfe6eacaadd7156 branch from f36e13b to c97f53b Compare January 20, 2026 23:31
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.

2 participants