Skip to content

Remove dead JSIndexedRAMBundle from cxxreact (#57133)#57133

Open
sammy-SC wants to merge 1 commit into
facebook:mainfrom
sammy-SC:export-D108001933
Open

Remove dead JSIndexedRAMBundle from cxxreact (#57133)#57133
sammy-SC wants to merge 1 commit into
facebook:mainfrom
sammy-SC:export-D108001933

Conversation

@sammy-SC

@sammy-SC sammy-SC commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary:

JSIndexedRAMBundle was a deprecated legacy-architecture class (annotated [[deprecated("This API will be removed along with the legacy architecture.")]] and guarded by #ifndef RCT_REMOVE_LEGACY_ARCH) for parsing indexed RAM bundles. It was only ever instantiated by Instance::loadRAMBundleFromString and Instance::loadRAMBundleFromFile, and those two Instance methods have no callers anywhere in fbsource: the old Android entry point CatalystInstanceImpl that used to call them has been deleted, and the new architecture (ReactInstance / bridgeless) routes loadScriptFromFile through loadJSBundleFromFile in the new runtime, never touching the legacy Instance. The only remaining user was its own unit test.

This removes JSIndexedRAMBundle and the two dead Instance RAM-bundle loaders that referenced it:

  • Delete JSIndexedRAMBundle.cpp, JSIndexedRAMBundle.h, and JSIndexedRAMBundleTest.cpp.
  • Remove loadRAMBundleFromString / loadRAMBundleFromFile from Instance.cpp / Instance.h and drop the now-unused include.
  • Drop JSIndexedRAMBundle.h from CXXREACT_PUBLIC_HEADERS in cxxreact/BUCK.
  • Update the committed C++ API snapshots accordingly.

The broader legacy RAM-bundle machinery (RAMBundleRegistry, JSModulesUnbundle, Instance::loadRAMBundle, JSIExecutor::setBundleRegistry) is left in place; it belongs to the same RCT_REMOVE_LEGACY_ARCH legacy bridge and can be removed as a follow-up.

Changelog: [Internal]

Differential Revision: D108001933

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 9, 2026
@facebook-github-tools facebook-github-tools Bot added p: Facebook Partner: Facebook Partner labels Jun 9, 2026
Summary:

`JSIndexedRAMBundle` was a deprecated legacy-architecture class (annotated `[[deprecated("This API will be removed along with the legacy architecture.")]]` and guarded by `#ifndef RCT_REMOVE_LEGACY_ARCH`) for parsing indexed RAM bundles. It was only ever instantiated by `Instance::loadRAMBundleFromString` and `Instance::loadRAMBundleFromFile`, and those two `Instance` methods have no callers anywhere in fbsource: the old Android entry point `CatalystInstanceImpl` that used to call them has been deleted, and the new architecture (`ReactInstance` / bridgeless) routes `loadScriptFromFile` through `loadJSBundleFromFile` in the new runtime, never touching the legacy `Instance`. The only remaining user was its own unit test.

This removes `JSIndexedRAMBundle` and the two dead `Instance` RAM-bundle loaders that referenced it:

- Delete `JSIndexedRAMBundle.cpp`, `JSIndexedRAMBundle.h`, and `JSIndexedRAMBundleTest.cpp`.
- Remove `loadRAMBundleFromString` / `loadRAMBundleFromFile` from `Instance.cpp` / `Instance.h` and drop the now-unused include.
- Drop `JSIndexedRAMBundle.h` from `CXXREACT_PUBLIC_HEADERS` in `cxxreact/BUCK`.
- Update the committed C++ API snapshots accordingly.

The broader legacy RAM-bundle machinery (`RAMBundleRegistry`, `JSModulesUnbundle`, `Instance::loadRAMBundle`, `JSIExecutor::setBundleRegistry`) is left in place; it belongs to the same `RCT_REMOVE_LEGACY_ARCH` legacy bridge and can be removed as a follow-up.

Changelog: [Internal]

Differential Revision: D108001933
@meta-codesync meta-codesync Bot changed the title Remove dead JSIndexedRAMBundle from cxxreact Remove dead JSIndexedRAMBundle from cxxreact (#57133) Jun 9, 2026
@sammy-SC sammy-SC force-pushed the export-D108001933 branch from 80df54c to 39c10d2 Compare June 9, 2026 13:39
sammy-SC added a commit to sammy-SC/react-native that referenced this pull request Jun 9, 2026
Summary:
Pull Request resolved: facebook#57133

`JSIndexedRAMBundle` was a deprecated legacy-architecture class (annotated `[[deprecated("This API will be removed along with the legacy architecture.")]]` and guarded by `#ifndef RCT_REMOVE_LEGACY_ARCH`) for parsing indexed RAM bundles. It was only ever instantiated by `Instance::loadRAMBundleFromString` and `Instance::loadRAMBundleFromFile`, and those two `Instance` methods have no callers anywhere in fbsource: the old Android entry point `CatalystInstanceImpl` that used to call them has been deleted, and the new architecture (`ReactInstance` / bridgeless) routes `loadScriptFromFile` through `loadJSBundleFromFile` in the new runtime, never touching the legacy `Instance`. The only remaining user was its own unit test.

This removes `JSIndexedRAMBundle` and the two dead `Instance` RAM-bundle loaders that referenced it:

- Delete `JSIndexedRAMBundle.cpp`, `JSIndexedRAMBundle.h`, and `JSIndexedRAMBundleTest.cpp`.
- Remove `loadRAMBundleFromString` / `loadRAMBundleFromFile` from `Instance.cpp` / `Instance.h` and drop the now-unused include.
- Drop `JSIndexedRAMBundle.h` from `CXXREACT_PUBLIC_HEADERS` in `cxxreact/BUCK`.
- Update the committed C++ API snapshots accordingly.

The broader legacy RAM-bundle machinery (`RAMBundleRegistry`, `JSModulesUnbundle`, `Instance::loadRAMBundle`, `JSIExecutor::setBundleRegistry`) is left in place; it belongs to the same `RCT_REMOVE_LEGACY_ARCH` legacy bridge and can be removed as a follow-up.

Changelog: [Internal]

Differential Revision: D108001933
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. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant