Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extracting Platform Specific TM code to break dependency cycle between ReactCommon and React-Core #36461

Closed
wants to merge 1 commit into from

Commits on Mar 13, 2023

  1. Extracting Platform Specific TM code to break dependency cycle betwee…

    …n ReactCommon and React-Core (facebook#36461)
    
    Summary:
    Pull Request resolved: facebook#36461
    
    This change breaks a dependency cycle between `ReactCommon` and `React-Core`.
    
    `React-Core` depends on `ReactCommon` to have access to the various `TurboModule` native files.
    
    `ReactCommon` depends on `React-Core` because the content of the `core/platform/ios` folder and the `samples` folder needs to access the `RCTBridge` and other files in Core.
    
    To break the circular dependency, we introduced two new `podspecs`:
    
    * `React-NativeModulesApple` for the content of `core/platform/ios`.
    * `ReactCommon-Samples` for the content of the `samples` folder.
    
    In this way, the new dependencies are linear as `React-NativeModulesApple` and `ReactCommon-Samples` depends on `React-Core` and `ReactCommon` and `React-Core` only depends on  `ReactCommon`.
    
    While doing this, we also make sure that all the include path are aligned, to limit the amount of breaking changes.
    
    ## Changelog:
    [iOS][Breaking] - Split the `ReactCommon/react/nativemodule/core/platform/ios` and `ReactCommon/react/nativemodule/samples` in two separate pods to break circular dependencies.
    
    Reviewed By: mdvacca
    
    Differential Revision: D44023865
    
    fbshipit-source-id: d7cb460cc762fe9d6911f7f41afc74d49e74fcbf
    cipolleschi authored and facebook-github-bot committed Mar 13, 2023
    Configuration menu
    Copy the full SHA
    f9be097 View commit details
    Browse the repository at this point in the history