Skip to content

Classify legacy bridge JNI headers as private - #58811

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

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

Conversation

@j-piasecki

Copy link
Copy Markdown
Contributor

Summary:
Classifies JavaModuleWrapper.h, JavaScriptExecutorHolder.h, JniJSModulesUnbundle.h, MethodInvoker.h and ModuleRegistryBuilder.h from the reactnativejni target as "private" under the three-tier C++ stable API visibility model. They exist only to wire the legacy bridge and expose private cxxreact types. Consumers that opt into RN_STRICT_API now get an error if they include them directly; without that flag the guards are inert, so no existing build changes behaviour.

The remaining headers of reactnativejni are not classified yet.

Changelog: [Internal]

Differential Revision: D122764164

Summary:

`react/renderer/imagemanager/primitives.h` is public and re-exported by `<React/ImageManager.h>`, but it included the private `react/renderer/debug/debugStringConvertibleUtils.h`. Under `RN_STRICT_API`, any consumer including the umbrella hit the private-header `#error`.

Move the bodies of `ImageSource::getDebugProps` and the two `ImageSource::toString` overloads into a new `primitives.cpp`, which includes the private header. The header keeps only the declarations; `SharedDebugStringConvertibleList` is already provided by `<React/RendererDebug.h>`.

Changelog: [Internal]

Differential Revision: D122761709
Summary:
Classifies `JavaModuleWrapper.h`, `JavaScriptExecutorHolder.h`, `JniJSModulesUnbundle.h`, `MethodInvoker.h` and `ModuleRegistryBuilder.h` from the `reactnativejni` target as "private" under the three-tier C++ stable API visibility model. They exist only to wire the legacy bridge and expose private `cxxreact` types. Consumers that opt into `RN_STRICT_API` now get an error if they include them directly; without that flag the guards are inert, so no existing build changes behaviour.

The remaining headers of `reactnativejni` are not classified yet.

Changelog: [Internal]

Differential Revision: D122764164
@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 Oct 2, 2026
@facebook-github-tools facebook-github-tools Bot added p: Software Mansion Partner: Software Mansion Partner p: Facebook Partner: Facebook labels Oct 2, 2026
@meta-codesync

meta-codesync Bot commented Oct 2, 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 D122764164.

This branch has not been deployed

No deployments
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