Skip to content

Commit 880cd59

Browse files
j-piaseckimeta-codesync[bot]
authored andcommitted
Use module umbrella headers in attributedstring
Summary: The `attributedstring` headers included fine-grained public headers from other modules (`react/renderer/core`, `graphics`, `debug`, `css`, `mapbuffer`, `components/view`, `react/utils`, `react/debug`). Those headers are protected by `UmbrellaGuard.h`, so a consumer that defines `RN_STRICT_API` and includes `attributedstring` headers would hit a hard `#error` from these transitive includes. Replace them with the module umbrellas (`<React/RendererCore.h>`, `<React/Graphics.h>`, `<React/RendererDebug.h>`, `<React/CSS.h>`, `<React/MapBuffer.h>`, `<React/View.h>`, `<React/Utils.h>`, `<React/Debug.h>`). `ShadowView.h` (frameworks tier, no umbrella) and `ReactNativePublicFeatureFlags.h` (unguarded) stay as direct includes. Changelog: [Internal] Differential Revision: D123001117
1 parent 148a6e0 commit 880cd59

3 files changed

Lines changed: 3 additions & 0 deletions

File tree

‎packages/react-native/ReactCommon/react/renderer/attributedstring/AttributedString.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <react/cxxstableapi/FrameworksGuard.h>
1111

1212
#include <React/RendererCore.h>
13+
#include <React/RendererDebug.h>
1314
#include <React/Utils.h>
1415
#include <react/renderer/attributedstring/TextAttributes.h>
1516
#include <react/renderer/mounting/ShadowView.h>

‎packages/react-native/ReactCommon/react/renderer/attributedstring/ParagraphAttributes.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
#include <React/Graphics.h>
1515
#include <React/RendererCore.h>
16+
#include <React/RendererDebug.h>
1617
#include <React/Utils.h>
1718
#include <react/renderer/attributedstring/primitives.h>
1819

‎packages/react-native/ReactCommon/react/renderer/attributedstring/TextAttributes.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
#include <React/Graphics.h>
1818
#include <React/RendererCore.h>
19+
#include <React/RendererDebug.h>
1920
#include <React/Utils.h>
2021
#include <React/View.h>
2122
#include <folly/dynamic.h>

0 commit comments

Comments
 (0)