Skip to content

Conversation

@taeold
Copy link
Contributor

@taeold taeold commented Oct 29, 2025

Detects firebase-functions v7+ in the emulator runtime and skips legacy stubs and config helpers that are incompatible with the new SDK version, preserving backward compatibility for older versions.

Detects `firebase-functions` v7+ in the emulator runtime and skips legacy
stubs and config helpers that are incompatible with the new SDK version,
preserving backward compatibility for older versions.
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @taeold, 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 enhances the Firebase emulator's compatibility by introducing version-aware logic for the firebase-functions SDK. It specifically addresses changes in firebase-functions v7.0.0 and above, preventing the application of outdated stubs and configuration helpers that are incompatible with the newer SDK. This ensures that the emulator operates correctly across various firebase-functions versions, preserving functionality for both legacy and modern projects.

Highlights

  • Firebase Functions v7+ Detection: The emulator now includes logic to detect if firebase-functions v7.0.0 or newer is being utilized in the project.
  • Skipping Legacy Stubs: When firebase-functions v7.0.0 or higher is detected, the emulator will skip applying legacy stubs that are incompatible with the newer SDK version.
  • Skipping Legacy Config Helper: Similarly, the legacy functions.config() helper, which is not compatible with v7.0.0+, will be bypassed for newer firebase-functions versions.
  • Backward Compatibility: These changes ensure that the emulator maintains backward compatibility, allowing older versions of firebase-functions to continue functioning correctly while properly handling the new SDK versions.
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 correctly adds a version check to skip legacy monkeypatching for firebase-functions v7 and newer. My review focuses on improving the implementation by addressing code duplication. The version check and firebase-functions module resolution are performed in multiple places. I've suggested a refactoring to centralize this logic in the initializeRuntime function. This will make the code more efficient by avoiding redundant module lookups and more maintainable by removing duplicated code.

@taeold taeold enabled auto-merge (squash) October 29, 2025 17:23
@taeold taeold disabled auto-merge October 29, 2025 21:16
@taeold taeold enabled auto-merge (squash) October 30, 2025 02:24
@taeold taeold merged commit 6741d27 into master Oct 30, 2025
50 checks passed
@taeold taeold deleted the dl-drop-cfg-helpder branch October 30, 2025 16:09
@github-project-automation github-project-automation bot moved this from Approved [PR] to Done in [Cloud] Extensions + Functions Oct 30, 2025
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.

3 participants