Skip to content

Conversation

@joshlf
Copy link
Member

@joshlf joshlf commented Feb 8, 2026


Latest Update: v19 — Compare vs v18

📚 Full Patch History

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

Version 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
⬇️ Download this PR

Branch

git fetch origin refs/heads/G3db3762006cf6333a7112b668f747072f8bb477b && git checkout -b pr-G3db3762006cf6333a7112b668f747072f8bb477b FETCH_HEAD

Checkout

git fetch origin refs/heads/G3db3762006cf6333a7112b668f747072f8bb477b && git checkout FETCH_HEAD

Cherry Pick

git fetch origin refs/heads/G3db3762006cf6333a7112b668f747072f8bb477b && git cherry-pick FETCH_HEAD

Pull

git pull origin refs/heads/G3db3762006cf6333a7112b668f747072f8bb477b

Stacked PRs enabled by GHerrit.

@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 focuses on stabilizing the hermes tool by addressing test failures. It refines the internal parsing and code transformation mechanisms, particularly for impl paths and the redaction of unsafe function bodies. The changes ensure that the generated code remains syntactically correct and that test expectations are accurately reflected, leading to a more robust and reliable system.

Highlights

  • Refined impl Path Generation: The logic for generating impl path segments in parse.rs has been simplified, removing redundant string manipulations and improving clarity.
  • Migration to Byte Ranges for Edits: The transform.rs module now uses std::ops::Range<usize> instead of proc_macro2::Span for specifying code regions to be blanked out. This provides more precise control over byte-level text manipulation.
  • Improved unsafe Function Redaction: The append_edits function now redacts only the contents of unsafe function blocks, ensuring that the surrounding curly braces {} are preserved. This results in syntactically valid, empty function bodies after transformation.
  • Extensive Test Fixture Updates: Numerous test fixtures across the hermes/tests/fixtures directory have been updated to align with the new parsing and transformation behaviors. This includes adding a _hermes_dummy function to many lib.rs files and adjusting expected outputs for function body redaction and path formatting.
  • Updated Test Expectations: Several test cases now include expected_status.txt files indicating an expected 'failure', reflecting changes in how certain scenarios are handled or validated.

🧠 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.

Changelog
  • tools/hermes/src/parse.rs
    • Simplified impl path segment generation by removing .to_string().replace(" ", "") calls.
    • Introduced a self_ty variable for better code readability and reduced repetition.
  • tools/hermes/src/transform.rs
    • Replaced proc_macro2::Span with std::ops::Range<usize> for edit specifications.
    • Modified append_edits to redact only the inner content of unsafe function blocks, preserving curly braces.
    • Updated apply_edits and related tests to correctly handle Range<usize>.
  • tools/hermes/tests/fixtures/complex_impl/expected_config.toml
    • Adjusted --start-from argument to include spaces in UFCS paths, matching updated parsing behavior.
  • tools/hermes/tests/fixtures/complex_impl/expected_status.txt
    • Added new file indicating an expected test failure.
  • tools/hermes/tests/fixtures/crlf_endings/expected/src/lib.rs
    • Added _hermes_dummy function.
  • tools/hermes/tests/fixtures/crlf_endings/source/src/lib.rs
    • Added _hermes_dummy function.
  • tools/hermes/tests/fixtures/custom_path_mod/source/src/lib.rs
    • Added _hermes_dummy function.
  • tools/hermes/tests/fixtures/deep_invocation/source/src/lib.rs
    • Added _hermes_dummy function.
  • tools/hermes/tests/fixtures/dir_mod/source/src/lib.rs
    • Added _hermes_dummy function.
  • tools/hermes/tests/fixtures/dirty_target_dir/expected/src/lib.rs
    • Added _hermes_dummy function.
  • tools/hermes/tests/fixtures/dirty_target_dir/source/src/lib.rs
    • Added _hermes_dummy function.
  • tools/hermes/tests/fixtures/empty_file/expected/src/lib.rs
    • Added _hermes_dummy function.
  • tools/hermes/tests/fixtures/empty_file/source/src/lib.rs
    • Added _hermes_dummy function.
  • tools/hermes/tests/fixtures/file_mod/expected/src/lib.rs
    • Added _hermes_dummy function.
  • tools/hermes/tests/fixtures/file_mod/source/src/lib.rs
    • Added _hermes_dummy function.
  • tools/hermes/tests/fixtures/ignored_files/expected/src/lib.rs
    • Added _hermes_dummy function.
  • tools/hermes/tests/fixtures/ignored_files/source/src/lib.rs
    • Added _hermes_dummy function.
  • tools/hermes/tests/fixtures/inline_mod/expected/src/lib.rs
    • Added _hermes_dummy function.
  • tools/hermes/tests/fixtures/inline_mod/source/src/lib.rs
    • Added _hermes_dummy function.
  • tools/hermes/tests/fixtures/large_assets/source/src/lib.rs
    • Added _hermes_dummy function.
  • tools/hermes/tests/fixtures/missing_cfg_mod/expected/src/lib.rs
    • Added _hermes_dummy function.
  • tools/hermes/tests/fixtures/missing_cfg_mod/source/src/lib.rs
    • Added _hermes_dummy function.
  • tools/hermes/tests/fixtures/multi_artifact/expected/src/lib.rs
    • Added _hermes_dummy function.
  • tools/hermes/tests/fixtures/multi_artifact/source/src/lib.rs
    • Added _hermes_dummy function.
  • tools/hermes/tests/fixtures/non_standard_layout/expected/code/custom.rs
    • Added _hermes_dummy function.
  • tools/hermes/tests/fixtures/non_standard_layout/source/code/custom.rs
    • Added _hermes_dummy function.
  • tools/hermes/tests/fixtures/split_artifact/expected/src/main.rs
    • Changed fn main() to pub fn main().
  • tools/hermes/tests/fixtures/split_artifact/expected_artifacts.toml
    • Removed file.
  • tools/hermes/tests/fixtures/split_artifact/expected_status.txt
    • Added new file indicating an expected test failure.
  • tools/hermes/tests/fixtures/split_artifact/source/src/main.rs
    • Changed fn main() to pub fn main().
  • tools/hermes/tests/fixtures/target_selection/expected/src/main.rs
    • Added _hermes_dummy function.
  • tools/hermes/tests/fixtures/target_selection/expected_status.txt
    • Added new file indicating an expected test failure.
  • tools/hermes/tests/fixtures/target_selection/source/src/main.rs
    • Added _hermes_dummy function.
  • tools/hermes/tests/fixtures/unsafe_redaction/expected/src/lib.rs
    • Updated expected output for unsafe function bodies to be redacted to { }.
  • tools/hermes/tests/fixtures/virtual_workspace/expected/crates/a/src/lib.rs
    • Added _hermes_dummy function.
  • tools/hermes/tests/fixtures/virtual_workspace/source/crates/a/src/lib.rs
    • Added _hermes_dummy function.
  • tools/hermes/tests/fixtures/weird_functions/expected/src/lib.rs
    • Updated expected output for async, const, and extern functions to include empty { } bodies after redaction.
  • tools/hermes/tests/fixtures/weird_functions/expected_status.txt
    • Added new file indicating an expected test failure.
  • tools/hermes/tests/fixtures/weird_functions/source/Cargo.lock
    • Added new Cargo.lock file.
  • tools/hermes/tests/fixtures/weird_functions/source/Cargo.toml
    • Added [workspace] section.
Activity
  • No specific activity (comments, reviews, etc.) was provided in the context for this pull request.
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 aims to get the tests passing again. It includes a refactoring of impl path generation in parse.rs and improves the redaction logic in transform.rs to preserve function body braces, which is a good change. My review includes a couple of suggestions: a minor idiomatic improvement in transform.rs, and a comment on the testing strategy of adding a dummy function across many test fixtures, which seems like a workaround for a potential issue in hermes when handling crates with no annotated items. A number of tests are also updated to be expected failures, which may be intentional to highlight existing bugs.

for byte in &mut buffer[span.byte_range()] {
pub fn apply_edits(buffer: &mut [u8], edits: &[Range<usize>]) {
for range in edits {
for byte in &mut buffer[range.clone()] {
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

Since Range<usize> is a Copy type, you can dereference range directly instead of calling clone(). This is slightly more idiomatic.

Suggested change
for byte in &mut buffer[range.clone()] {
for byte in &mut buffer[*range] {

Comment on lines +3 to +5
/// ```lean
/// ```
fn _hermes_dummy() {}
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This dummy function with a lean block is being added to many test fixtures. While this likely fixes the tests, it seems like a workaround. It suggests that hermes might not handle crates with no annotated items gracefully. It might be better to fix hermes to support this case, which would allow removing these dummy functions from the test fixtures.

@codecov-commenter
Copy link

codecov-commenter commented Feb 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.87%. Comparing base (ff70bf6) to head (81f4cda).

Additional details and impacted files
@@                            Coverage Diff                             @@
##           G60bb1cd41a5fade3144a05f2bdafb2a670059e03    #3018   +/-   ##
==========================================================================
  Coverage                                      91.87%   91.87%           
==========================================================================
  Files                                             20       20           
  Lines                                           6057     6057           
==========================================================================
  Hits                                            5565     5565           
  Misses                                           492      492           

☔ 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 G3db3762006cf6333a7112b668f747072f8bb477b branch from e17001b to bd320db Compare February 10, 2026 00:50
@joshlf joshlf force-pushed the G60bb1cd41a5fade3144a05f2bdafb2a670059e03 branch from 8f20400 to f187d94 Compare February 10, 2026 00:50
@joshlf joshlf force-pushed the G60bb1cd41a5fade3144a05f2bdafb2a670059e03 branch from f187d94 to 5660a8c Compare February 10, 2026 23:18
@joshlf joshlf force-pushed the G3db3762006cf6333a7112b668f747072f8bb477b branch from bd320db to 76a916e Compare February 10, 2026 23:18
gherrit-pr-id: G3db3762006cf6333a7112b668f747072f8bb477b
@joshlf joshlf force-pushed the G60bb1cd41a5fade3144a05f2bdafb2a670059e03 branch from 5660a8c to ff70bf6 Compare February 11, 2026 18:52
@joshlf joshlf force-pushed the G3db3762006cf6333a7112b668f747072f8bb477b branch from 76a916e to 81f4cda Compare February 11, 2026 18:52
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