Forward-declare private-target types in RuntimeScheduler.h (#58271) - #58271
Closed
j-piasecki wants to merge 1 commit into
Closed
Forward-declare private-target types in RuntimeScheduler.h (#58271)#58271j-piasecki wants to merge 1 commit into
j-piasecki wants to merge 1 commit into
Conversation
|
@j-piasecki has exported this pull request. If you are a Meta employee, you can view the originating Diff in D117838094. |
j-piasecki
added a commit
to j-piasecki/react-native
that referenced
this pull request
Sep 2, 2026
Summary: `RuntimeScheduler.h` included `PerformanceEntryReporter.h` and `ShadowTreeRevisionConsistencyManager.h` solely to name two pointer parameters. Both belong to targets classified private under the three-tier C++ stable API visibility model, and `RuntimeScheduler.h` is reachable from for-frameworks headers, so a consumer opting into `RN_STRICT_API` got a hard error out of `PrivateGuard.h` from a header they never named — one that neither `RN_ALLOW_FRAMEWORKS` nor an umbrella include can suppress. Replace both with forward declarations, and drop the now-redundant `ShadowTreeRevisionConsistencyManager.h` include from the two scheduler forks, which take the declarations from `RuntimeScheduler.h`. Two translation units were relying on the transitive include and now include the header directly: `RuntimeScheduler_Modern.cpp` (calls `reportLongTask`) and `ReactInstance.cpp` (calls `PerformanceEntryReporter::getInstance`). No build wiring changes — both targets already depend on `react/performance/timeline` and `react/renderer/consistency` for their own sources. Changelog: [General][Changed] - `RuntimeScheduler.h` no longer transitively includes `PerformanceEntryReporter.h` or `ShadowTreeRevisionConsistencyManager.h`; include them directly where the complete types are needed Differential Revision: D117838094
j-piasecki
force-pushed
the
export-D117838094
branch
from
September 2, 2026 12:01
c1c1887 to
2a917f5
Compare
j-piasecki
added a commit
to j-piasecki/react-native
that referenced
this pull request
Sep 4, 2026
Summary: `RuntimeScheduler.h` included `PerformanceEntryReporter.h` and `ShadowTreeRevisionConsistencyManager.h` solely to name two pointer parameters. Both belong to targets classified private under the three-tier C++ stable API visibility model, and `RuntimeScheduler.h` is reachable from for-frameworks headers, so a consumer opting into `RN_STRICT_API` got a hard error out of `PrivateGuard.h` from a header they never named — one that neither `RN_ALLOW_FRAMEWORKS` nor an umbrella include can suppress. Replace both with forward declarations, and drop the now-redundant `ShadowTreeRevisionConsistencyManager.h` include from the two scheduler forks, which take the declarations from `RuntimeScheduler.h`. Two translation units were relying on the transitive include and now include the header directly: `RuntimeScheduler_Modern.cpp` (calls `reportLongTask`) and `ReactInstance.cpp` (calls `PerformanceEntryReporter::getInstance`). No build wiring changes — both targets already depend on `react/performance/timeline` and `react/renderer/consistency` for their own sources. Changelog: [General][Changed] - `RuntimeScheduler.h` no longer transitively includes `PerformanceEntryReporter.h` or `ShadowTreeRevisionConsistencyManager.h`; include them directly where the complete types are needed Differential Revision: D117838094
j-piasecki
force-pushed
the
export-D117838094
branch
from
September 4, 2026 10:01
2a917f5 to
0defa02
Compare
j-piasecki
added a commit
to j-piasecki/react-native
that referenced
this pull request
Sep 7, 2026
Summary: `RuntimeScheduler.h` included `PerformanceEntryReporter.h` and `ShadowTreeRevisionConsistencyManager.h` solely to name two pointer parameters. Both belong to targets classified private under the three-tier C++ stable API visibility model, and `RuntimeScheduler.h` is reachable from for-frameworks headers, so a consumer opting into `RN_STRICT_API` got a hard error out of `PrivateGuard.h` from a header they never named — one that neither `RN_ALLOW_FRAMEWORKS` nor an umbrella include can suppress. Replace both with forward declarations, and drop the now-redundant `ShadowTreeRevisionConsistencyManager.h` include from the two scheduler forks, which take the declarations from `RuntimeScheduler.h`. Two translation units were relying on the transitive include and now include the header directly: `RuntimeScheduler_Modern.cpp` (calls `reportLongTask`) and `ReactInstance.cpp` (calls `PerformanceEntryReporter::getInstance`). No build wiring changes — both targets already depend on `react/performance/timeline` and `react/renderer/consistency` for their own sources. Changelog: [General][Changed] - `RuntimeScheduler.h` no longer transitively includes `PerformanceEntryReporter.h` or `ShadowTreeRevisionConsistencyManager.h`; include them directly where the complete types are needed Differential Revision: D117838094
j-piasecki
force-pushed
the
export-D117838094
branch
from
September 7, 2026 10:48
0defa02 to
fce84b7
Compare
Summary: Replaces `PerformanceEntryReporter` and `ShadowTreeRevisionConsistencyManager` with forward declarations and removes the now redundant `ShadowTreeRevisionConsistencyManager` include from the forked headers. Changelog: [General][Changed] - `RuntimeScheduler.h` no longer transitively includes `PerformanceEntryReporter.h` or `ShadowTreeRevisionConsistencyManager.h`; include them directly where the complete types are needed Differential Revision: D117838094
j-piasecki
force-pushed
the
export-D117838094
branch
from
September 7, 2026 10:52
fce84b7 to
5b2e37f
Compare
|
This pull request has been merged in 7aff51e. |
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:
Replaces
PerformanceEntryReporterandShadowTreeRevisionConsistencyManagerwith forward declarations and removes the now redundantShadowTreeRevisionConsistencyManagerinclude from the forked headers.Changelog:
[General][Changed] -
RuntimeScheduler.hno longer transitively includesPerformanceEntryReporter.horShadowTreeRevisionConsistencyManager.h; include them directly where the complete types are neededDifferential Revision: D117838094