Skip to content

Forward declare JSExecutorFactory in RCTAppSetupUtils (#58134) - #58134

Open
j-piasecki wants to merge 2 commits into
react:mainfrom
j-piasecki:export-D117330792
Open

Forward declare JSExecutorFactory in RCTAppSetupUtils (#58134)#58134
j-piasecki wants to merge 2 commits into
react:mainfrom
j-piasecki:export-D117330792

Conversation

@j-piasecki

@j-piasecki j-piasecki commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

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

@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 Aug 25, 2026
@facebook-github-tools facebook-github-tools Bot added p: Software Mansion Partner: Software Mansion Partner p: Facebook Partner: Facebook labels Aug 25, 2026
@meta-codesync

meta-codesync Bot commented Aug 25, 2026

Copy link
Copy Markdown

@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
@meta-codesync meta-codesync Bot changed the title Forward declare JSExecutorFactory in RCTAppSetupUtils Forward declare JSExecutorFactory in RCTAppSetupUtils (#58134) Aug 26, 2026
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 p: Software Mansion Partner: Software Mansion Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant