Skip to content

Separate turbo and legacy module caches - #36986

Closed
RSNara wants to merge 2 commits into
react:mainfrom
RSNara:export-D45131296
Closed

Separate turbo and legacy module caches#36986
RSNara wants to merge 2 commits into
react:mainfrom
RSNara:export-D45131296

Conversation

@RSNara

@RSNara RSNara commented Apr 19, 2023

Copy link
Copy Markdown
Contributor

Summary:
global.nativeModuleProxy and global.__turboModuleProxy should not share the same cache.

Otherwise, global.nativeModuleProxy could return TurboModules, and global.__turboModuleProxy could return legacy native modules.

Changelog: [Internal]

Differential Revision: D45131296

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner fb-exported labels Apr 19, 2023
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D45131296

RSNara and others added 2 commits April 20, 2023 10:17
Summary:
tbd. nocommit

Changelog: [Internal]

Differential Revision: D45131297

fbshipit-source-id: 560831e096478c63c575598437d982fecfbb08da
Summary:
Pull Request resolved: react#36986

global.nativeModuleProxy and global.__turboModuleProxy should not share the same cache.

Otherwise, global.nativeModuleProxy could return TurboModules, and global.__turboModuleProxy could return legacy native modules.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D45131296

fbshipit-source-id: 5456d31fc35d7eaac02298ea5a87b427c85b0c2d
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D45131296

@RSNara
RSNara force-pushed the export-D45131296 branch from 5d1a698 to e611ae8 Compare April 20, 2023 17:19
@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Apr 20, 2023
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request has been merged in 9637390.

huntie added a commit to huntie/react-native that referenced this pull request Jul 29, 2026
…ct#36986) (react#57753)

Summary:

## Summary

Migrate internal `Libraries/` import subpaths from `react-native` to the
incoming dedicated entry points in React Native 0.87.

**Motivation**

See [**RFC0894: Removing deep imports from
react-native**](react-native-community/discussions-and-proposals#894)

**Changes**

The `react-private-interface` entry point has been created explicitly
for the private contract between React ↔ React Native, and is 1:1 with
the previous `ReactNativePrivateInterface` module.

Both of the below `Libraries/` paths still exist, but are deprecated —
this is a lagging migration that will enable cleanup in a future RN
version.

- `react-native/Libraries/Core/InitializeCore` →
`react-native/setup-env`
[react#57475](react#57475)
- `react-native/Libraries/ReactPrivate/ReactNativePrivateInterface` →
`react-native/react-private-interface`
[react#57495](react#57495)

## Test Plan

Flow

DiffTrain build for [96fcba90138e9f1a73ee1cc4f79a653ec12fc3a9](react/react@96fcba9)

Reviewed By: hoxyq

Differential Revision: D113928305
huntie added a commit to huntie/react-native that referenced this pull request Jul 29, 2026
…ct#36986) (react#57753)

Summary:

## Summary

Migrate internal `Libraries/` import subpaths from `react-native` to the
incoming dedicated entry points in React Native 0.87.

**Motivation**

See [**RFC0894: Removing deep imports from
react-native**](react-native-community/discussions-and-proposals#894)

**Changes**

The `react-private-interface` entry point has been created explicitly
for the private contract between React ↔ React Native, and is 1:1 with
the previous `ReactNativePrivateInterface` module.

Both of the below `Libraries/` paths still exist, but are deprecated —
this is a lagging migration that will enable cleanup in a future RN
version.

- `react-native/Libraries/Core/InitializeCore` →
`react-native/setup-env`
[react#57475](react#57475)
- `react-native/Libraries/ReactPrivate/ReactNativePrivateInterface` →
`react-native/react-private-interface`
[react#57495](react#57495)

## Test Plan

Flow

DiffTrain build for [96fcba90138e9f1a73ee1cc4f79a653ec12fc3a9](react/react@96fcba9)

Reviewed By: hoxyq

Differential Revision: D113928305
huntie added a commit to huntie/react-native that referenced this pull request Jul 29, 2026
…ct#36986) (react#57753)

Summary:

## Summary

Migrate internal `Libraries/` import subpaths from `react-native` to the
incoming dedicated entry points in React Native 0.87.

**Motivation**

See [**RFC0894: Removing deep imports from
react-native**](react-native-community/discussions-and-proposals#894)

**Changes**

The `react-private-interface` entry point has been created explicitly
for the private contract between React ↔ React Native, and is 1:1 with
the previous `ReactNativePrivateInterface` module.

Both of the below `Libraries/` paths still exist, but are deprecated —
this is a lagging migration that will enable cleanup in a future RN
version.

- `react-native/Libraries/Core/InitializeCore` →
`react-native/setup-env`
[react#57475](react#57475)
- `react-native/Libraries/ReactPrivate/ReactNativePrivateInterface` →
`react-native/react-private-interface`
[react#57495](react#57495)

## Test Plan

Flow

DiffTrain build for [96fcba90138e9f1a73ee1cc4f79a653ec12fc3a9](react/react@96fcba9)

Reviewed By: hoxyq

Differential Revision: D113928305
huntie added a commit to huntie/react-native that referenced this pull request Jul 29, 2026
…ct#36986) (react#57753)

Summary:

## Summary

Migrate internal `Libraries/` import subpaths from `react-native` to the
incoming dedicated entry points in React Native 0.87.

**Motivation**

See [**RFC0894: Removing deep imports from
react-native**](react-native-community/discussions-and-proposals#894)

**Changes**

The `react-private-interface` entry point has been created explicitly
for the private contract between React ↔ React Native, and is 1:1 with
the previous `ReactNativePrivateInterface` module.

Both of the below `Libraries/` paths still exist, but are deprecated —
this is a lagging migration that will enable cleanup in a future RN
version.

- `react-native/Libraries/Core/InitializeCore` →
`react-native/setup-env`
[react#57475](react#57475)
- `react-native/Libraries/ReactPrivate/ReactNativePrivateInterface` →
`react-native/react-private-interface`
[react#57495](react#57495)

## Test Plan

Flow

DiffTrain build for [96fcba90138e9f1a73ee1cc4f79a653ec12fc3a9](react/react@96fcba9)

Reviewed By: hoxyq

Differential Revision: D113928305
huntie added a commit to huntie/react-native that referenced this pull request Jul 29, 2026
…ct#36986) (react#57753)

Summary:

## Summary

Migrate internal `Libraries/` import subpaths from `react-native` to the
incoming dedicated entry points in React Native 0.87.

**Motivation**

See [**RFC0894: Removing deep imports from
react-native**](react-native-community/discussions-and-proposals#894)

**Changes**

The `react-private-interface` entry point has been created explicitly
for the private contract between React ↔ React Native, and is 1:1 with
the previous `ReactNativePrivateInterface` module.

Both of the below `Libraries/` paths still exist, but are deprecated —
this is a lagging migration that will enable cleanup in a future RN
version.

- `react-native/Libraries/Core/InitializeCore` →
`react-native/setup-env`
[react#57475](react#57475)
- `react-native/Libraries/ReactPrivate/ReactNativePrivateInterface` →
`react-native/react-private-interface`
[react#57495](react#57495)

## Test Plan

Flow

DiffTrain build for [96fcba90138e9f1a73ee1cc4f79a653ec12fc3a9](react/react@96fcba9)

Reviewed By: hoxyq

Differential Revision: D113928305
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants