Forward declare JSExecutorFactory in RCTAppSetupUtils (#58134) - #58134
Open
j-piasecki wants to merge 2 commits into
Open
Forward declare JSExecutorFactory in RCTAppSetupUtils (#58134)#58134j-piasecki wants to merge 2 commits into
j-piasecki wants to merge 2 commits into
Conversation
|
@j-piasecki has exported this pull request. If you are a Meta employee, you can view the originating Diff in D117330792. |
Summary: Classifies `jsiexecutor:jsiexecutor` as a private target under the C++ stable API three-tier visibility model. Adds `#include <react/cxxstableapi/PrivateGuard.h>` to both exported headers (`JSIExecutor.h` and `JSINativeModules.h`), and wires the guard dependency into BUCK, CMake and the podspec. The podspec needs no `USE_FRAMEWORKS` header search path edit: it already sets `HEADER_SEARCH_PATHS` to `"$(PODS_TARGET_SRCROOT)/.."` unconditionally, and that resolves to `ReactCommon`. The guards are inert unless a consumer defines `RN_STRICT_API`, so there is no behavior change. Changelog: [Internal] Differential Revision: D117330790
Summary: `RCTAppSetupUtils.h` is a public header - every app's AppDelegate imports it as `<React/RCTAppSetupUtils.h>` - but it imported `<jsireact/JSIExecutor.h>` while naming nothing from it. The only symbol it needs out of that include chain is `JSExecutorFactory`, the return type of `RCTAppSetupDefaultJsExecutorFactory`, which is declared in `<cxxreact/JSExecutor.h>`. Both `jsiexecutor:jsiexecutor` and `cxxreact:bridge` are private targets under the three-tier C++ stable API visibility model. The type is forward declared alongside the existing `RuntimeScheduler` forward declaration - `std::unique_ptr<T>` needs only an incomplete type in a declaration - and `<cxxreact/JSExecutor.h>` moves to the implementation file. Code that relied on reaching `JSIExecutor` or `JSExecutorFactory` through this header should import `<jsireact/JSIExecutor.h>` or `<cxxreact/JSExecutor.h>` directly. Changelog: [iOS][Changed] - `RCTAppSetupUtils.h` no longer transitively imports `JSIExecutor.h` or `JSExecutor.h` Differential Revision: D117330792
j-piasecki
force-pushed
the
export-D117330792
branch
from
August 26, 2026 07:25
84f8a19 to
2f86a3b
Compare
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:
RCTAppSetupUtils.his a public header - every app's AppDelegate imports it as<React/RCTAppSetupUtils.h>- but it imported<jsireact/JSIExecutor.h>while naming nothing from it. The only symbol it needs out of that include chain isJSExecutorFactory, the return type ofRCTAppSetupDefaultJsExecutorFactory, which is declared in<cxxreact/JSExecutor.h>.Both
jsiexecutor:jsiexecutorandcxxreact:bridgeare private targets under the three-tier C++ stable API visibility model. The type is forward declared alongside the existingRuntimeSchedulerforward declaration -std::unique_ptr<T>needs only an incomplete type in a declaration - and<cxxreact/JSExecutor.h>moves to the implementation file.Code that relied on reaching
JSIExecutororJSExecutorFactorythrough this header should import<jsireact/JSIExecutor.h>or<cxxreact/JSExecutor.h>directly.Changelog:
[iOS][Changed] -
RCTAppSetupUtils.hno longer transitively importsJSIExecutor.horJSExecutor.hDifferential Revision: D117330792