Commit 8f53555
Move the SampleTurboModule main-queue annotation back to rn-tester (#58516)
Summary:
#56723 moved `SampleTurboModule`'s `unstableRequiresMainQueueSetup` annotation from rn-tester's `codegenConfig` into react-native's. Codegen collects these annotations from every library and emits them into `RCTUnstableModulesRequiringMainQueueSetupProvider`, so every app now lists `SampleTurboModule`, and `RCTInstance` eagerly requests it at startup. The native class only ships with rn-tester, so every other app logs "Unable to find module for SampleTurboModule", which is a redbox in development.
The annotation is keyed by module name and does not need to live next to the spec, so move it back to rn-tester, the one app that links the class. Running the generator with react-native alone now yields the six core modules; adding rn-tester's config yields the same list plus `SampleTurboModule`.
Changelog:
[iOS] [Fixed] - Stop apps from requesting the sample TurboModule that only rn-tester provides
Pull Request resolved: #58516
Test Plan:
Ran `generateUnstableModulesRequiringMainQueueSetupProvider` against `packages/react-native` alone and against `packages/react-native` plus `packages/rn-tester`:
rn-only: AccessibilityManager, Appearance, AppState, DeviceInfo, PlatformConstants, StatusBarManager
with-rn-tester: AccessibilityManager, Appearance, AppState, DeviceInfo, PlatformConstants, StatusBarManager, SampleTurboModule
Reproduced the redbox in Expo Go on 0.87.0, 0.87.1 and 0.88.0-rc.0.
Reviewed By: cipolleschi
Differential Revision: D120190436
Pulled By: christophpurrer
fbshipit-source-id: b1991cca7d8bce889e57866eb507e4259f61425f1 parent 7ce27d0 commit 8f53555
2 files changed
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | 206 | | |
210 | 207 | | |
211 | 208 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
49 | 54 | | |
50 | 55 | | |
51 | 56 | | |
| |||
0 commit comments