Repository navigation
Reject non-TurboModule exported modules when both interops are removed (#60531) - #60531
Merged
Merged
Conversation
|
@christophpurrer has exported this pull request. If you are a Meta employee, you can view the originating Diff in D136017712. |
christophpurrer
added a commit
to christophpurrer/react-native-macos
that referenced
this pull request
Dec 4, 2026
react#60531) Summary: With both legacy interop layers removed, `RCTTurboModuleManager` only creates classes that conform to `RCTTurboModule`. A module exported with `RCT_EXPORT_MODULE` that does not conform compiles but resolves to nil at runtime, so lookups such as URL request handlers and image loaders silently fall back. Make `RCT_EXPORT_MODULE` fail the build for such classes instead. Changelog: [iOS][Changed] - `RCT_EXPORT_MODULE` fails to compile for classes that do not conform to `RCTTurboModule` when both `RCT_REMOVE_LEGACY_MODULE_INTEROP` and `RCT_REMOVE_LEGACY_COMPONENT_INTEROP` are set Differential Revision: D136017712
christophpurrer
force-pushed
the
export-D136017712
branch
from
December 4, 2026 06:54
50cdd7d to
5458203
Compare
christophpurrer
added a commit
to christophpurrer/react-native-macos
that referenced
this pull request
Dec 4, 2026
react#60531) Summary: With both legacy interop layers removed, `RCTTurboModuleManager` only creates classes that conform to `RCTTurboModule`. A module exported with `RCT_EXPORT_MODULE` that does not conform compiles but resolves to nil at runtime, so lookups such as URL request handlers and image loaders silently fall back. Make `RCT_EXPORT_MODULE` fail the build for such classes instead. Changelog: [iOS][Changed] - `RCT_EXPORT_MODULE` fails to compile for classes that do not conform to `RCTTurboModule` when both `RCT_REMOVE_LEGACY_MODULE_INTEROP` and `RCT_REMOVE_LEGACY_COMPONENT_INTEROP` are set Differential Revision: D136017712
christophpurrer
force-pushed
the
export-D136017712
branch
from
December 4, 2026 07:02
5458203 to
0ce20d5
Compare
Visual regressionNo visual differences at android: no capture |
christophpurrer
added a commit
to christophpurrer/react-native-macos
that referenced
this pull request
Dec 4, 2026
react#60531) Summary: With both legacy interop layers removed, `RCTTurboModuleManager` only creates classes that conform to `RCTTurboModule`. A module exported with `RCT_EXPORT_MODULE` that does not conform compiles but resolves to nil at runtime, so lookups such as URL request handlers and image loaders silently fall back. Make `RCT_EXPORT_MODULE` fail the build for such classes instead. Changelog: [iOS][Changed] - `RCT_EXPORT_MODULE` fails to compile for classes that do not conform to `RCTTurboModule` when both `RCT_REMOVE_LEGACY_MODULE_INTEROP` and `RCT_REMOVE_LEGACY_COMPONENT_INTEROP` are set Differential Revision: D136017712
christophpurrer
force-pushed
the
export-D136017712
branch
2 times, most recently
from
December 4, 2026 13:55
264fc62 to
5e98ee3
Compare
christophpurrer
added a commit
to christophpurrer/react-native-macos
that referenced
this pull request
Dec 4, 2026
react#60531) Summary: With both legacy interop layers removed, `RCTTurboModuleManager` only creates classes that conform to `RCTTurboModule`. A module exported with `RCT_EXPORT_MODULE` that does not conform compiles but resolves to nil at runtime, so lookups such as URL request handlers and image loaders silently fall back. Make `RCT_EXPORT_MODULE` fail the build for such classes instead. Changelog: [iOS][Changed] - `RCT_EXPORT_MODULE` fails to compile for classes that do not conform to `RCTTurboModule` when both `RCT_REMOVE_LEGACY_MODULE_INTEROP` and `RCT_REMOVE_LEGACY_COMPONENT_INTEROP` are set Differential Revision: D136017712
christophpurrer
added a commit
to christophpurrer/react-native-macos
that referenced
this pull request
Dec 4, 2026
react#60531) Summary: With both legacy interop layers removed, `RCTTurboModuleManager` only creates classes that conform to `RCTTurboModule`. A module exported with `RCT_EXPORT_MODULE` that does not conform compiles but resolves to nil at runtime, so lookups such as URL request handlers and image loaders silently fall back. Make `RCT_EXPORT_MODULE` fail the build for such classes instead. Changelog: [iOS][Changed] - `RCT_EXPORT_MODULE` fails to compile for classes that do not conform to `RCTTurboModule` when both `RCT_REMOVE_LEGACY_MODULE_INTEROP` and `RCT_REMOVE_LEGACY_COMPONENT_INTEROP` are set Differential Revision: D136017712
christophpurrer
force-pushed
the
export-D136017712
branch
from
December 4, 2026 15:04
5e98ee3 to
07cc538
Compare
christophpurrer
added a commit
to christophpurrer/react-native-macos
that referenced
this pull request
Dec 4, 2026
react#60531) Summary: With both legacy interop layers removed, `RCTTurboModuleManager` only creates classes that conform to `RCTTurboModule`. A module exported with `RCT_EXPORT_MODULE` that does not conform compiles but resolves to nil at runtime, so lookups such as URL request handlers and image loaders silently fall back. Make `RCT_EXPORT_MODULE` fail the build for such classes instead. Changelog: [iOS][Changed] - `RCT_EXPORT_MODULE` fails to compile for classes that do not conform to `RCTTurboModule` when both `RCT_REMOVE_LEGACY_MODULE_INTEROP` and `RCT_REMOVE_LEGACY_COMPONENT_INTEROP` are set Differential Revision: D136017712
christophpurrer
force-pushed
the
export-D136017712
branch
from
December 4, 2026 15:20
07cc538 to
bfdc1f1
Compare
christophpurrer
added a commit
to christophpurrer/react-native-macos
that referenced
this pull request
Dec 4, 2026
react#60531) Summary: With both legacy interop layers removed, `RCTTurboModuleManager` only creates classes that conform to `RCTTurboModule`. A module exported with `RCT_EXPORT_MODULE` that does not conform compiles but resolves to nil at runtime, so lookups such as URL request handlers and image loaders silently fall back. Make `RCT_EXPORT_MODULE` fail the build for such classes instead. Changelog: [iOS][Changed] - `RCT_EXPORT_MODULE` fails to compile for classes that do not conform to `RCTTurboModule` when both `RCT_REMOVE_LEGACY_MODULE_INTEROP` and `RCT_REMOVE_LEGACY_COMPONENT_INTEROP` are set Differential Revision: D136017712
christophpurrer
force-pushed
the
export-D136017712
branch
from
December 4, 2026 16:10
bfdc1f1 to
9e04573
Compare
shwanton
approved these changes
Dec 4, 2026
shwanton
left a comment
Contributor
There was a problem hiding this comment.
Review automatically exported from Phabricator review in Meta.
christophpurrer
added a commit
to christophpurrer/react-native-macos
that referenced
this pull request
Dec 4, 2026
react#60531) Summary: With both legacy interop layers removed, `RCTTurboModuleManager` only creates classes that conform to `RCTTurboModule`. A module exported with `RCT_EXPORT_MODULE` that does not conform compiles but resolves to nil at runtime, so lookups such as URL request handlers and image loaders silently fall back. Make `RCT_EXPORT_MODULE` fail the build for such classes instead. Changelog: [iOS][Changed] - `RCT_EXPORT_MODULE` fails to compile for classes that do not conform to `RCTTurboModule` when both `RCT_REMOVE_LEGACY_MODULE_INTEROP` and `RCT_REMOVE_LEGACY_COMPONENT_INTEROP` are set Reviewed By: shwanton Differential Revision: D136017712
christophpurrer
force-pushed
the
export-D136017712
branch
2 times, most recently
from
December 4, 2026 17:36
740d95b to
3fd72a6
Compare
christophpurrer
added a commit
to christophpurrer/react-native-macos
that referenced
this pull request
Dec 4, 2026
react#60531) Summary: With both legacy interop layers removed, `RCTTurboModuleManager` only creates classes that conform to `RCTTurboModule`. A module exported with `RCT_EXPORT_MODULE` that does not conform compiles but resolves to nil at runtime, so lookups such as URL request handlers and image loaders silently fall back. Make `RCT_EXPORT_MODULE` fail the build for such classes instead. Changelog: [iOS][Changed] - `RCT_EXPORT_MODULE` fails to compile for classes that do not conform to `RCTTurboModule` when both `RCT_REMOVE_LEGACY_MODULE_INTEROP` and `RCT_REMOVE_LEGACY_COMPONENT_INTEROP` are set Reviewed By: shwanton Differential Revision: D136017712
christophpurrer
added a commit
to christophpurrer/react-native-macos
that referenced
this pull request
Dec 4, 2026
react#60531) Summary: With both legacy interop layers removed, `RCTTurboModuleManager` only creates classes that conform to `RCTTurboModule`. A module exported with `RCT_EXPORT_MODULE` that does not conform compiles but resolves to nil at runtime, so lookups such as URL request handlers and image loaders silently fall back. Make `RCT_EXPORT_MODULE` fail the build for such classes instead. Changelog: [iOS][Changed] - `RCT_EXPORT_MODULE` fails to compile for classes that do not conform to `RCTTurboModule` when both `RCT_REMOVE_LEGACY_MODULE_INTEROP` and `RCT_REMOVE_LEGACY_COMPONENT_INTEROP` are set Reviewed By: shwanton Differential Revision: D136017712
christophpurrer
force-pushed
the
export-D136017712
branch
from
December 4, 2026 18:21
3fd72a6 to
0ae8f0a
Compare
christophpurrer
added a commit
to christophpurrer/react-native-macos
that referenced
this pull request
Dec 5, 2026
react#60531) Summary: With both legacy interop layers removed, `RCTTurboModuleManager` only creates classes that conform to `RCTTurboModule`. A module exported with `RCT_EXPORT_MODULE` that does not conform compiles but resolves to nil at runtime, so lookups such as URL request handlers and image loaders silently fall back. Make `RCT_EXPORT_MODULE` fail the build for such classes instead. Changelog: [iOS][Changed] - `RCT_EXPORT_MODULE` fails to compile for classes that do not conform to `RCTTurboModule` when both `RCT_REMOVE_LEGACY_MODULE_INTEROP` and `RCT_REMOVE_LEGACY_COMPONENT_INTEROP` are set Signed-off-by: Christoph Purrer chpurrer@meta.com Reviewed By: shwanton Differential Revision: D136017712
christophpurrer
force-pushed
the
export-D136017712
branch
from
December 5, 2026 05:41
0ae8f0a to
9f94a21
Compare
christophpurrer
added a commit
to christophpurrer/react-native-macos
that referenced
this pull request
Dec 5, 2026
react#60531) Summary: With both legacy interop layers removed, `RCTTurboModuleManager` only creates classes that conform to `RCTTurboModule`. A module exported with `RCT_EXPORT_MODULE` that does not conform compiles but resolves to nil at runtime, so lookups such as URL request handlers and image loaders silently fall back. Make `RCT_EXPORT_MODULE` fail the build for such classes instead. Changelog: [iOS][Changed] - `RCT_EXPORT_MODULE` fails to compile for classes that do not conform to `RCTTurboModule` when both `RCT_REMOVE_LEGACY_MODULE_INTEROP` and `RCT_REMOVE_LEGACY_COMPONENT_INTEROP` are set Signed-off-by: Christoph Purrer chpurrer@meta.com Reviewed By: shwanton Differential Revision: D136017712
christophpurrer
force-pushed
the
export-D136017712
branch
from
December 5, 2026 06:07
9f94a21 to
01a40c5
Compare
react#60531) Summary: With both legacy interop layers removed, `RCTTurboModuleManager` only creates classes that conform to `RCTTurboModule`. A module exported with `RCT_EXPORT_MODULE` that does not conform compiles but resolves to nil at runtime, so lookups such as URL request handlers and image loaders silently fall back. Make `RCT_EXPORT_MODULE` fail the build for such classes instead. Changelog: [iOS][Changed] - `RCT_EXPORT_MODULE` fails to compile for classes that do not conform to `RCTTurboModule` when both `RCT_REMOVE_LEGACY_MODULE_INTEROP` and `RCT_REMOVE_LEGACY_COMPONENT_INTEROP` are set Signed-off-by: Christoph Purrer <chpurrer@meta.com> Reviewed By: shwanton Differential Revision: D136017712
christophpurrer
force-pushed
the
export-D136017712
branch
from
December 5, 2026 06:22
01a40c5 to
3fa5d83
Compare
Collaborator
|
This pull request was successfully merged by @christophpurrer in 37beffc When will my fix make it into a release? | How to file a pick request? |
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.
Summary:
With both legacy interop layers removed,
RCTTurboModuleManageronly creates classes that conform toRCTTurboModule. A module exported withRCT_EXPORT_MODULEthat does not conform compiles but resolves to nil at runtime, so lookups such as URL request handlers and image loaders silently fall back. MakeRCT_EXPORT_MODULEfail the build for such classes instead.Changelog:
[iOS][Changed] -
RCT_EXPORT_MODULEfails to compile for classes that do not conform toRCTTurboModulewhen bothRCT_REMOVE_LEGACY_MODULE_INTEROPandRCT_REMOVE_LEGACY_COMPONENT_INTEROPare setSigned-off-by: Christoph Purrer chpurrer@meta.com
Reviewed By: shwanton
Differential Revision: D136017712