Remove dead JSIndexedRAMBundle from cxxreact (#57133)#57133
Open
sammy-SC wants to merge 1 commit into
Open
Conversation
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
80df54c to
39c10d2
Compare
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
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:
JSIndexedRAMBundlewas 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 byInstance::loadRAMBundleFromStringandInstance::loadRAMBundleFromFile, and those twoInstancemethods have no callers anywhere in fbsource: the old Android entry pointCatalystInstanceImplthat used to call them has been deleted, and the new architecture (ReactInstance/ bridgeless) routesloadScriptFromFilethroughloadJSBundleFromFilein the new runtime, never touching the legacyInstance. The only remaining user was its own unit test.This removes
JSIndexedRAMBundleand the two deadInstanceRAM-bundle loaders that referenced it:JSIndexedRAMBundle.cpp,JSIndexedRAMBundle.h, andJSIndexedRAMBundleTest.cpp.loadRAMBundleFromString/loadRAMBundleFromFilefromInstance.cpp/Instance.hand drop the now-unused include.JSIndexedRAMBundle.hfromCXXREACT_PUBLIC_HEADERSincxxreact/BUCK.The broader legacy RAM-bundle machinery (
RAMBundleRegistry,JSModulesUnbundle,Instance::loadRAMBundle,JSIExecutor::setBundleRegistry) is left in place; it belongs to the sameRCT_REMOVE_LEGACY_ARCHlegacy bridge and can be removed as a follow-up.Changelog: [Internal]
Differential Revision: D108001933