-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Closed
Labels
Needs: React Native Team AttentionPartnerResolution: FixedA PR that fixes this issue has been merged.A PR that fixes this issue has been merged.Type: Upgrade IssueIssues reported from upgrade issue formIssues reported from upgrade issue formp: MicrosoftPartner: MicrosoftPartner: Microsoft
Description
Old Version
0.73.4
New Version
0.74.0-rc.1
Description
If a New Architecture enabled library implements ReactModuleInfoProvider
using a pattern like below:
override fun getReactModuleInfoProvider(): ReactModuleInfoProvider = ReactModuleInfoProvider {
val info = ReactModuleInfo(
WebStorageModule.NAME,
WebStorageModule::class.java.name,
false,
false,
false,
false,
TurboModule::class.java.isAssignableFrom(WebStorageModule::class.java) // <-- THIS
)
mapOf(info.name() to info).toMutableMap()
}
It will no longer be detected as a TurboModule because TurboModule::class.java.isAssignableFrom()
will now return false
. The reason is because the TurboModule
class used here is no longer the same TurboModule
class used for the generated spec: b7191cd
Quite a number of libraries currently use this pattern: https://github.com/search?q=TurboModule.class.isAssignableFrom&type=code
Steps to reproduce
git clone https://github.com/microsoft/react-native-test-app.git
cd react-native-test-app
npm run set-react-version 0.74 -- --core-only
yarn
cd example
yarn android --extra-params "-PnewArchEnabled=true"
# In a separate terminal
yarn start
Affected Platforms
Runtime - Android, Build - MacOS
Output of npx react-native info
n/a
Stacktrace or Logs
n/a
Reproducer
https://github.com/microsoft/react-native-test-app.git
Screenshots and Videos
n/a
Metadata
Metadata
Assignees
Labels
Needs: React Native Team AttentionPartnerResolution: FixedA PR that fixes this issue has been merged.A PR that fixes this issue has been merged.Type: Upgrade IssueIssues reported from upgrade issue formIssues reported from upgrade issue formp: MicrosoftPartner: MicrosoftPartner: Microsoft