feat!: migrate to TurboModules#9080
Conversation
Summary of ChangesHello, 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 initiates the coordinated migration of the React Native Firebase monorepo to the React Native New Architecture using TurboModules. It establishes the foundational infrastructure, including a unified module resolver, committed generated artifacts, and updated type-testing configurations. The changes focus on migrating the core 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 the 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 counterproductive. 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. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request removes the deprecated namespaced JavaScript API across multiple packages (such as analytics, app-check, and app-distribution) to transition to a modular-only architecture for v26. It also introduces the foundational TurboModule migration for the app package under the New Architecture, updating native iOS/Android configurations, JNI codegen, and test harness setups. Feedback on these changes highlights several stability improvements, including preventing a TypeError in initializeAppCheck when options are omitted, ensuring correct context and null-safety when resolving native module constants, adding try-catch protection to app-destroy callbacks, and guarding against potential null pointer exceptions when querying external storage directories in Android.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
d38edde to
6924759
Compare
This comment was marked as resolved.
This comment was marked as resolved.
Add TurboModule migration OKF bundle with work queue, implementation workflow extending change authoring, and package-extensions cross-link.
…n infra BREAKING CHANGE: App/Core modules native bridge requires New Architecture. Migrate RNFBAppModule and RNFBUtilsModule to Codegen TurboModules with unified resolver, lazy Proxy wrapper, and committed generated artifacts. Includes functions codegenConfig rename (NewArch-AD-7), test harness overrides, architecture decisions, and validation workflow hardening.
Register @react-native-firebase/app in compare:types and document 25 modular API deltas against firebase-js-sdk. Type SDK_VERSION as string.
BREAKING CHANGE: Firestore native bridge requires New Architecture.
Legacy NativeModules bridge removed; four Codegen TurboModule specs
(NativeRNFBTurboFirestore{,Collection,Document,Transaction}) with
committed generated artifacts, Android/iOS turbo shells, and JS wiring.
Environment.getExternalStoragePublicDirectory can return null when external storage is unavailable; guard the pictures and movies directory constants instead of dereferencing getAbsolutePath directly.
Durable NewArch-AD-4 § messaging: evidence table from primary sources, shell-only Phase 4 scope, and explicit testing gate for event delivery. Queue rows point to ADR; no duplicated gap-analysis narrative.
Convert the messaging native module to a Codegen TurboModule shell while keeping the legacy event-emitter path in place per NewArch-AD-4. Method calls now route through NativeRNFBTurboMessaging (iOS .mm shell, Android spec-backed shell); event delivery continues over the app-module proxy so foreground, background, and headless message handling are unchanged. Add committed codegen artifacts, register messaging in codegen:verify and the spec-native parity list, and remove the legacy Android module. BREAKING CHANGE: messaging requires the React Native New Architecture.
Apply google-java-format and clang-format (Google style) to migrated TurboModule native shells so yarn lint exits 0 repo-wide on the NA branch.
c8982bd to
296466d
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #9080 +/- ##
==========================================
+ Coverage 58.72% 59.77% +1.05%
==========================================
Files 333 363 +30
Lines 24985 27642 +2657
Branches 4149 4155 +6
==========================================
+ Hits 14671 16520 +1849
- Misses 9504 10342 +838
+ Partials 810 780 -30
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Force Detox TestingAVD launches and Jet retries to skip Quick Boot snapshot restore, which could leave the emulator offline on a gray screen.
296466d to
4c8edad
Compare
f5d5d21 to
ae5976c
Compare
russellwheatley
left a comment
There was a problem hiding this comment.
Well this is a big PR 😄! Wonderful to have TurboModules practically complete 🥳 . I like the OKF docs, keep everything in the repo. Although quite a lot to take in 😅. LGTM
Summary
Coordinated New Architecture migration: legacy
NativeModules→ Codegen TurboModules (NativeRNFBTurbo*), unified module resolver, committed generated artifacts, and shared test/validation infrastructure.Status: All native bridge packages migrated (Phases 0–5). Phase R complete —
NativeModulesfallback removed; missing TurboModules throw at resolver. EventEmitter cutover deferred to Phase C; async→sync conversion deferred to Phase S.Infra in this branch: architecture decisions (OKF), gitignored harness overrides, implementation/review gate hardening, Jest TurboModule contract tests,
compare:typesregistration,codegen:verifyCI guard, Android emulator cold-boot for reliable Detox runs.Related #8584
Migration checklist
@react-native-firebase/app@react-native-firebase/functions@react-native-firebase/auth@react-native-firebase/firestore@react-native-firebase/database@react-native-firebase/messaging@react-native-firebase/storage@react-native-firebase/crashlytics@react-native-firebase/analytics@react-native-firebase/remote-config@react-native-firebase/app-check@react-native-firebase/perf@react-native-firebase/installations@react-native-firebase/in-app-messaging@react-native-firebase/app-distribution@react-native-firebase/ml@react-native-firebase/phone-number-verificationTest plan
CI / unit validation
yarn lint:js/yarn lint:android/yarn lint:ios:checkyarn tests:jest— package contract tests + TurboModule parity guardsyarn codegen:verify— generated artifacts match committed outputyarn compare:types— all registered packages green (19/19)Area-focused e2e (per migrated package)
app— full tierfirestore— area-focused (multi-module + pipelines)installations,perf,in-app-messaging,app-distribution,ml— area-focusedapp-check,remote-config,analytics,crashlytics,storage— area-focusedmessaging— area-focused (turbo shell; legacy event path preserved per AD-4)database— area-focused (5 specs)auth— area-focused (60-method spec)phone-number-verification— area-focused (Android-only)Phase R — full harness (3-platform proof run)
yarn tests:macos:test-cover— 683 passing / 36 pending / 0 failingyarn tests:ios:test-cover— 823 passing / 85 pending / 0 failingyarn tests:android:test-cover— 849 passing / 58 pending / 0 failinggetReactNativeModulethrows for unknown module (all platforms)-no-snapshot-load(gray-screen fix)Known deferred (not merge blockers)
onMessagedelivery e2e — remainsxit; re-enable in Phase C