Conversation
Summary of ChangesHello @scidomino, 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 the capability to dynamically reload extension hooks without requiring a full application restart. By adding explicit refresh mechanisms to the hook registry and system, and integrating these into the extension loading process, the system can now seamlessly update its understanding of available hooks when extensions are installed, uninstalled, or updated. This significantly improves the developer and user experience by making extension changes immediately effective. Highlights
Using Gemini Code AssistThe 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
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 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
|
|
Size Change: -993 B (0%) Total Size: 21.6 MB ℹ️ View Unchanged
|
There was a problem hiding this comment.
Code Review
This pull request introduces the ability to refresh hooks when an extension is updated, which is a valuable enhancement. The implementation involves adding a refresh method to the hook system and integrating it into the extension loading lifecycle. A new integration test validates this new functionality. My review focuses on two areas for improvement: enhancing the reliability of the new integration test by removing a fixed delay, and addressing code duplication in the HookRegistry to improve long-term maintainability.
439dd8f to
a4d7aad
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request correctly implements the reloading of hooks when extensions are refreshed by re-initializing the hook system. The removal of redundant initialization checks in HookSystem and HookRegistry simplifies the code and enables this re-initialization. The changes are well-tested with a new integration test and updates to existing unit tests. I've found one critical issue in the new integration test regarding shell command quoting that could make the test flaky or fail in certain environments.
a4d7aad to
45298a3
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request correctly implements the refreshing of hooks when extensions are updated. The core change in extensionLoader.ts to re-initialize the hook system is sound and is triggered correctly after extension loading or unloading operations. The related refactoring to remove idempotency checks in the hook system's initialization is a necessary and clean way to enable this refresh behavior. The addition of a comprehensive integration test (hooks-reload.test.ts) is excellent, as it thoroughly validates the end-to-end functionality. The changes are well-implemented and improve the extension ecosystem.
ad4d685 to
3e3c399
Compare
3e3c399 to
3ae6645
Compare
Summary
Refresh hooks when refreshing extensions
Details
Also:
HookSystem.initialize()is only called fromconfig.initialize()which already has protections against multiple calls..integration-testfile that was accidentally merged in a previous PR.Related Issues
Fixes #14531
How to Validate
Uninstall an extension with a hook and verify that it no longer gets called.
Pre-Merge Checklist