fix(app): align iOS constants with generated spec - #9220
Open
huytdps13400 wants to merge 1 commit into
Open
Conversation
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The generated New Architecture protocols declare
constantsToExportandgetConstantsasModuleConstants<...::Constants>, whileRNFBAppModuleandRNFBUtilsModulestill implementedModuleConstants<...::Constants::Builder>. Objective-C++ therefore sees incompatible method return types against the generated spec.This aligns the four implementation signatures with the generated header without changing the constants dictionaries or runtime behavior. A Jest parity test now compares both implementations against their generated protocols so future codegen changes cannot silently drift.
Related issues
Fixes #9212
Release Summary
Fix iOS New Architecture build errors caused by mismatched TurboModule constants return types.
Checklist
AndroidiOSOther(macOS, web)e2etests added or updated inpackages/**/e2ejesttests added or updated inpackages/**/__tests__Test Plan
Constants::Builderfrom both implementations versusConstantsfrom both generated protocols.yarn tests:jest packages/app/__tests__ --runInBand— 9 suites, 95 tests passed.yarn tsc:compileyarn workspace @react-native-firebase/app compileyarn eslint packages/app/__tests__/iosConstantsReturnTypeParity.test.ts --max-warnings=0yarn prettier --check packages/app/__tests__/iosConstantsReturnTypeParity.test.tsyarn lint:ios:checkyarn codegen:verify— regenerated all configured Android/iOS artifacts with no drift.🔥