Skip to content

Conversation

@m62624
Copy link
Member

@m62624 m62624 commented Jan 20, 2026

Resolves #1179

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @m62624, 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 introduces a significant enhancement by enabling method overriding in services, providing a powerful mechanism for customizing inherited behavior. It integrates a new #[override_entry] macro into the macro system, allowing developers to define custom implementations for methods from extended services. The changes are thoroughly demonstrated with new examples and validated with dedicated test cases, ensuring robust and flexible service development.

Highlights

  • New #[override_entry] Macro: Introduced a new procedural macro #[override_entry] that allows methods within a service to override methods inherited from its base services. This macro supports both short-typed style (e.g., #[override_entry(walker_service_methods::Walk)]) and manual style (e.g., #[override_entry(MammalService, 1)]) for specifying the overridden method.
  • Service Method Overriding Support: The core macro system has been updated to correctly handle method overriding. This includes modifications to how service methods are dispatched, ensuring that overridden methods are called instead of their base implementations when specified.
  • Demonstration and Testing: A new example module inheritance has been added to showcase the functionality of service method overriding, including composite and chained service inheritance. Corresponding test cases (inheritance_redefine_works) have been added to validate the correct behavior of overridden methods.
  • Client-Side Updates: The client IDL (demo_client.idl) and generated Rust client code (demo_client.rs) have been updated to include the new Inheritance and Chain services, ensuring that client applications can interact with these new service structures.
  • Macro Snapshot Updates: Numerous snapshot tests across ethexe/macros-tests and macros/core/tests have been updated to reflect the changes in macro expansion logic, confirming that the new #[override_entry] attribute and related features are correctly processed during compilation.
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 significant new feature: the ability to override methods in services. The changes span across the macro implementations, client code generation, and example applications to demonstrate the functionality. The core logic for handling overrides in the gservice macro seems well-thought-out. I've identified a few areas for improvement, including an inefficiency in the new example code, a potential bug in the client code generation, a logic issue in the new override_entry attribute macro, and a small redundancy in the macro implementation. Addressing these points will help ensure the robustness and maintainability of this new feature.

@m62624 m62624 marked this pull request as ready for review January 21, 2026 05:48
@m62624 m62624 requested a review from vobradovich January 21, 2026 06:20
@m62624 m62624 force-pushed the feat/idl-v2-override-methods branch 2 times, most recently from 3c4f49b to 8bb4f83 Compare January 23, 2026 10:58
- feat: add find_method_data
- refactor: generate_fn_hash
- fix: tests
- fix: check_asyncness_impl
@m62624 m62624 force-pushed the feat/idl-v2-override-methods branch from 8bb4f83 to 1a0a014 Compare January 23, 2026 11:04
@m62624 m62624 requested a review from vobradovich January 26, 2026 10:33
@m62624 m62624 requested a review from vobradovich February 5, 2026 04:06
@m62624 m62624 force-pushed the feat/idl-v2-override-methods branch from c5a7a2f to 847df89 Compare February 5, 2026 13:25
@vobradovich vobradovich assigned vobradovich and m62624 and unassigned vobradovich Feb 5, 2026
@vobradovich vobradovich added the run-benchmarks Enables running benchmarks in CI label Feb 5, 2026
@m62624 m62624 force-pushed the feat/idl-v2-override-methods branch from d967979 to 120eecc Compare February 6, 2026 06:38
@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

🔬 Benchmark Comparison

Benchmark Current Baseline Change Change % Status
compute 465_520_439_916 465_485_012_100 +35_427_816 +0.01%
alloc-0 595_257_257 561_979_259 +33_277_998 +5.92%
alloc-12 598_814_243 565_520_788 +33_293_455 +5.89%
alloc-143 758_644_535 725_298_850 +33_345_685 +4.60% ⚠️
alloc-986 861_644_733 828_290_220 +33_354_513 +4.03% ⚠️
alloc-10945 2_215_897_006 2_042_673_536 +173_223_470 +8.48%
alloc-46367 6_541_274_107 6_507_908_597 +33_365_510 +0.51%
alloc-121392 17_167_907_284 17_134_416_241 +33_491_043 +0.20%
alloc-317810 43_905_221_311 43_871_725_854 +33_495_457 +0.08%
counter_sync 691_375_058 665_515_676 +25_859_382 +3.89% ⚠️
counter_async 861_425_456 837_190_903 +24_234_553 +2.89% ⚠️
cross_program 2_390_677_183 2_393_184_894 -2_507_711 -0.10%
redirect 3_462_462_934 3_425_067_798 +37_395_136 +1.09% ⚠️
stack_0 794_273_112 778_805_232 +15_467_880 +1.99% ⚠️
stack_1 3_758_139_476 3_693_170_602 +64_968_874 +1.76% ⚠️
stack_5 15_654_437_392 15_391_130_019 +263_307_373 +1.71% ⚠️
stack_10 29_379_956_259 28_866_676_553 +513_279_706 +1.78% ⚠️
stack_20 65_711_991_205 64_389_067_225 +1_322_923_980 +2.05% ⚠️

Legend

  • 🚀 Significant improvement (>5% reduction)
  • 👍 Minor improvement (<5% reduction)
  • ✅ No significant change
  • ⚠️ Minor regression (<5% increase)
  • ❌ Significant regression (>5% increase)

🤖 This comment was automatically generated by the benchmark comparison workflow at 116aece.

@m62624 m62624 merged commit 21c6ffe into master-idl-v2 Feb 6, 2026
4 checks passed
@m62624 m62624 deleted the feat/idl-v2-override-methods branch February 6, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-benchmarks Enables running benchmarks in CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants