Skip to content

[Hermes] Remove legacy Hermes C++ code and HERMES_V1_ENABLED compile definition#56697

Open
cipolleschi wants to merge 1 commit intomainfrom
cipolleschi/remove-legacy-hermes-phase1
Open

[Hermes] Remove legacy Hermes C++ code and HERMES_V1_ENABLED compile definition#56697
cipolleschi wants to merge 1 commit intomainfrom
cipolleschi/remove-legacy-hermes-phase1

Conversation

@cipolleschi
Copy link
Copy Markdown
Contributor

@cipolleschi cipolleschi commented May 6, 2026

Summary

  • Remove all dead C++ code behind !defined(HERMES_V1_ENABLED) guards in HermesExecutorFactory.cpp and HermesInstance.cpp
  • Delete Registration.h, Registration.cpp, ConnectionDemux.h, ConnectionDemux.cpp, and ConnectionDemuxTests.cpp (entirely legacy code)
  • Remove HERMES_V1_ENABLED compile definition from react-native-flags.cmake
  • Remove HERMES_V1_ENABLED cache variable from Android CMakeLists.txt

This is Phase 1 of removing legacy Hermes support. Since Hermes V1 is already the default on all platforms and the 0.86 branch has been cut, all legacy Hermes code
is dead and can be safely removed.

Next PR: #56700

Changelog:

[General][Breaking] - Remove Legacy Hermes from C++ code

Test plan

  • Android: ./gradlew :packages:rn-tester:android:app:assembleDebug — BUILD SUCCEEDED
  • iOS: xcodebuild rn-tester on iPhone 16 Pro simulator — BUILD SUCCEEDED

@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 May 6, 2026
@facebook-github-tools facebook-github-tools Bot added p: Facebook Partner: Facebook Partner labels May 6, 2026
@cipolleschi cipolleschi changed the title Remove legacy Hermes C++ code and HERMES_V1_ENABLED compile definition [Hermes] Remove legacy Hermes C++ code and HERMES_V1_ENABLED compile definition May 6, 2026
@cipolleschi cipolleschi marked this pull request as ready for review May 7, 2026 12:28
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented May 7, 2026

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this in D104228879.

Copy link
Copy Markdown
Contributor

@cortinico cortinico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review automatically exported from Phabricator review in Meta.

@cipolleschi cipolleschi force-pushed the cipolleschi/remove-legacy-hermes-phase1 branch 2 times, most recently from ae74eb0 to e56decd Compare May 7, 2026 14:17
Legacy Hermes support is no longer needed since 0.86 branch has been cut.
This removes all dead code behind `!defined(HERMES_V1_ENABLED)` guards
and the CMake infrastructure that set the HERMES_V1_ENABLED compile
definition.
@cipolleschi cipolleschi force-pushed the cipolleschi/remove-legacy-hermes-phase1 branch from e56decd to 7503721 Compare May 7, 2026 15:11
Copy link
Copy Markdown
Contributor

@cortinico cortinico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review automatically exported from Phabricator review in Meta.

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. p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants