Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions packages/react-native/ReactAndroid/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,6 @@ val preparePrefab by
"../ReactCommon/react/renderer/components/image/",
"react/renderer/components/image/",
),
Pair(
"../ReactCommon/react/renderer/components/image/React/",
"React/",
),
// rrc_view
Pair(
"../ReactCommon/react/renderer/components/view/",
Expand Down Expand Up @@ -205,10 +201,6 @@ val preparePrefab by
"../ReactCommon/react/renderer/components/text/",
"react/renderer/components/text/",
),
Pair(
"../ReactCommon/react/renderer/components/text/React/",
"React/",
),
Pair("../ReactCommon/react/renderer/components/text/platform/android/", ""),
Pair(
"../ReactCommon/react/renderer/attributedstring",
Expand Down
16 changes: 8 additions & 8 deletions packages/react-native/ReactCommon/React-Fabric.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ Pod::Spec.new do |s|

s.subspec "bridgingUmbrella" do |ss|
ss.source_files = "react/renderer/bridging/React/*.h"
ss.header_dir = "React"
ss.header_mappings_dir = "react/renderer/bridging/React"
ss.header_dir = ""
ss.header_mappings_dir = "react/renderer/bridging"
end

s.subspec "core" do |ss|
Expand Down Expand Up @@ -140,8 +140,8 @@ Pod::Spec.new do |s|

ss.subspec "rootUmbrella" do |sss|
sss.source_files = "react/renderer/components/root/React/*.h"
sss.header_dir = "React"
sss.header_mappings_dir = "react/renderer/components/root/React"
sss.header_dir = ""
sss.header_mappings_dir = "react/renderer/components/root"
end

ss.subspec "view" do |sss|
Expand All @@ -153,8 +153,8 @@ Pod::Spec.new do |s|

ss.subspec "viewUmbrella" do |sss|
sss.source_files = "react/renderer/components/view/React/*.h"
sss.header_dir = "React"
sss.header_mappings_dir = "react/renderer/components/view/React"
sss.header_dir = ""
sss.header_mappings_dir = "react/renderer/components/view"
end

ss.subspec "scrollview" do |sss|
Expand All @@ -165,8 +165,8 @@ Pod::Spec.new do |s|

ss.subspec "scrollviewUmbrella" do |sss|
sss.source_files = "react/renderer/components/scrollview/React/*.h"
sss.header_dir = "React"
sss.header_mappings_dir = "react/renderer/components/scrollview/React"
sss.header_dir = ""
sss.header_mappings_dir = "react/renderer/components/scrollview"
end

ss.subspec "legacyviewmanagerinterop" do |sss|
Expand Down
12 changes: 0 additions & 12 deletions packages/react-native/ReactCommon/React-FabricComponents.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,6 @@ Pod::Spec.new do |s|
sss.header_dir = "react/renderer/components/modal"
end

ss.subspec "modalUmbrella" do |sss|
sss.source_files = "react/renderer/components/modal/React/*.h"
sss.header_dir = "React"
sss.header_mappings_dir = "react/renderer/components/modal/React"
end

ss.subspec "safeareaview" do |sss|
sss.source_files = podspec_sources("react/renderer/components/safeareaview/**/*.{m,mm,cpp,h}", "react/renderer/components/safeareaview/**/*.h")
# Exclude tests to avoid conflicts with the react-native-safe-area-context package
Expand All @@ -116,12 +110,6 @@ Pod::Spec.new do |s|
sss.header_dir = "react/renderer/components/text"
end

ss.subspec "textUmbrella" do |sss|
sss.source_files = "react/renderer/components/text/React/*.h"
sss.header_dir = "React"
sss.header_mappings_dir = "react/renderer/components/text/React"
end

ss.subspec "iostextinput" do |sss|
sss.source_files = podspec_sources(["react/renderer/components/textinput/*.{m,mm,cpp,h}",
"react/renderer/components/textinput/platform/ios/**/*.{m,mm,cpp,h}"],
Expand Down
8 changes: 1 addition & 7 deletions packages/react-native/ReactCommon/React-FabricImage.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,13 @@ Pod::Spec.new do |s|
s.platforms = min_supported_versions
s.source = source
s.source_files = podspec_sources("react/renderer/components/image/**/*.{m,mm,cpp,h}", "react/renderer/components/image/**/*.h")
s.exclude_files = ["react/renderer/components/image/tests", "react/renderer/components/image/React"]
s.exclude_files = "react/renderer/components/image/tests"
s.header_dir = "react/renderer/components/image"
s.pod_target_xcconfig = { "USE_HEADERMAP" => "YES",
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
"HEADER_SEARCH_PATHS" => header_search_path.join(" ")
}

s.subspec "ImageUmbrella" do |ss|
ss.source_files = "react/renderer/components/image/React/*.h"
ss.header_dir = "React"
ss.header_mappings_dir = "react/renderer/components/image/React"
end

resolve_use_frameworks(s, header_mappings_dir: './', module_name: "React_FabricImage")

s.dependency "React-jsiexecutor", version
Expand Down
6 changes: 3 additions & 3 deletions packages/react-native/ReactCommon/React-Mapbuffer.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ Pod::Spec.new do |s|
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => ["\"$(PODS_TARGET_SRCROOT)\""], "USE_HEADERMAP" => "YES",
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard() }

s.subspec "MapBufferUmbrella" do |ss|
s.subspec "mapbufferUmbrella" do |ss|
ss.source_files = "react/renderer/mapbuffer/React/*.h"
ss.header_dir = "React"
ss.header_mappings_dir = "react/renderer/mapbuffer/React"
ss.header_dir = ""
ss.header_mappings_dir = "react/renderer/mapbuffer"
end

resolve_use_frameworks(s, header_mappings_dir: './', module_name: "React_Mapbuffer")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ Pod::Spec.new do |s|
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => header_search_paths.join(' ') }
s.header_dir = "ReactCommon"

s.subspec "CallInvokerUmbrella" do |ss|
s.subspec "callinvokerUmbrella" do |ss|
ss.source_files = "React/*.h"
ss.header_dir = "React"
ss.header_mappings_dir = "React"
ss.header_dir = ""
ss.header_mappings_dir = "."
end

s.dependency "React-cxxstableapi"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,16 @@
// =============================================================================

// Marks that the following headers are pulled in through the umbrella, so their
// shared guard (<react/cxxstableapi/UmbrellaGuard.h>) accepts them.
#define RN_UMBRELLA_CONTEXT
// shared guard (<react/cxxstableapi/UmbrellaGuard.h>) accepts them. The marker
// is saved and restored rather than defined and undefined: the scope ends at
// this block, so later *direct* includes in the same TU are still caught, and
// it nests inside an enclosing umbrella rather than disarming it.
#pragma push_macro("RN_UMBRELLA_CONTEXT")
#undef RN_UMBRELLA_CONTEXT
#define RN_UMBRELLA_CONTEXT 1

#include <ReactCommon/CallInvoker.h>
#include <ReactCommon/SchedulerPriority.h>

#undef RN_UMBRELLA_CONTEXT
#pragma pop_macro("RN_UMBRELLA_CONTEXT")
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,25 @@
// defining RN_STRICT_API.
//
// RN_UMBRELLA_CONTEXT Internal marker (implementation detail; consumers never
// set it). A module umbrella defines it around its own
// `#include`s to signal the blessed inclusion path:
// #define RN_UMBRELLA_CONTEXT
// set it). A module umbrella brackets its own `#include`s
// with it to signal the blessed inclusion path:
// #pragma push_macro("RN_UMBRELLA_CONTEXT")
// #undef RN_UMBRELLA_CONTEXT
// #define RN_UMBRELLA_CONTEXT 1
// #include <react/.../PublicHeaderA.h>
// #include <react/.../PublicHeaderB.h>
// #undef RN_UMBRELLA_CONTEXT
// The `#undef` matters: it keeps the marker scoped to the
// umbrella's includes so later *direct* includes in the
// same translation unit are still caught.
// #pragma pop_macro("RN_UMBRELLA_CONTEXT")
// Saving and restoring, rather than a bare
// `#define`/`#undef` pair, is what makes the scope both
// end at the umbrella -- later *direct* includes in the
// same translation unit are still caught -- and nest: an
// umbrella reached from inside another umbrella's
// context leaves the outer one armed. A bare `#undef`
// would disarm it, and every public header the outer
// umbrella included afterwards would hard-error.
// `scripts/add-cxxstableapi-guard.js --tier=public`
// emits this block; do not hand-write or "simplify" it.
//
// RN_BUILDING Defined by React Native's own build targets so internal
// sources may keep including the fine-grained headers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ Pod::Spec.new do |s|

resolve_use_frameworks(s, header_mappings_dir: "../..", module_name: "React_debug")

s.subspec "DebugUmbrella" do |ss|
s.subspec "debugUmbrella" do |ss|
ss.source_files = "React/*.h"
ss.header_dir = "React"
ss.header_mappings_dir = "React"
ss.header_dir = ""
ss.header_mappings_dir = "."
end

s.subspec "redbox" do |ss|
Expand Down
10 changes: 8 additions & 2 deletions packages/react-native/ReactCommon/react/debug/React/Debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,17 @@
// =============================================================================

// Marks that the following headers are pulled in through the umbrella, so their
// shared guard (<react/cxxstableapi/UmbrellaGuard.h>) accepts them.
#define RN_UMBRELLA_CONTEXT
// shared guard (<react/cxxstableapi/UmbrellaGuard.h>) accepts them. The marker
// is saved and restored rather than defined and undefined: the scope ends at
// this block, so later *direct* includes in the same TU are still caught, and
// it nests inside an enclosing umbrella rather than disarming it.
#pragma push_macro("RN_UMBRELLA_CONTEXT")
#undef RN_UMBRELLA_CONTEXT
#define RN_UMBRELLA_CONTEXT 1

#include <react/debug/flags.h>
#include <react/debug/react_native_assert.h>
#include <react/debug/react_native_expect.h>

#undef RN_UMBRELLA_CONTEXT
#pragma pop_macro("RN_UMBRELLA_CONTEXT")
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,15 @@
// =============================================================================

// Marks that the following headers are pulled in through the umbrella, so their
// shared guard (<react/cxxstableapi/UmbrellaGuard.h>) accepts them. Scoped to
// this block so later *direct* includes in the same translation unit are still
// caught.
#define RN_UMBRELLA_CONTEXT
// shared guard (<react/cxxstableapi/UmbrellaGuard.h>) accepts them. The marker
// is saved and restored rather than defined and undefined: the scope ends at
// this block, so later *direct* includes in the same TU are still caught, and
// it nests inside an enclosing umbrella rather than disarming it.
#pragma push_macro("RN_UMBRELLA_CONTEXT")
#undef RN_UMBRELLA_CONTEXT
#define RN_UMBRELLA_CONTEXT 1

#include <react/renderer/bridging/bridging.h>

#undef RN_UMBRELLA_CONTEXT
#pragma pop_macro("RN_UMBRELLA_CONTEXT")
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>
#include <react/cxxstableapi/FrameworksGuard.h>

#include <react/renderer/components/image/ImageShadowNode.h>
#include <react/renderer/core/ConcreteComponentDescriptor.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>
#include <react/cxxstableapi/FrameworksGuard.h>

#include <react/renderer/components/view/ViewEventEmitter.h>
#include <react/renderer/imagemanager/primitives.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>
#include <react/cxxstableapi/FrameworksGuard.h>

#include <react/renderer/components/view/ViewProps.h>
#include <react/renderer/core/PropsParserContext.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>
#include <react/cxxstableapi/FrameworksGuard.h>

#include <react/renderer/components/image/ImageEventEmitter.h>
#include <react/renderer/components/image/ImageProps.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>
#include <react/cxxstableapi/FrameworksGuard.h>

#include <react/renderer/imagemanager/ImageRequest.h>
#include <react/renderer/imagemanager/ImageRequestParams.h>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>
#include <react/cxxstableapi/FrameworksGuard.h>

#include <unordered_map>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>
#include <react/cxxstableapi/FrameworksGuard.h>

#include <glog/logging.h>
#include <react/renderer/components/modal/ModalHostViewShadowNode.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>
#include <react/cxxstableapi/FrameworksGuard.h>

#include <react/renderer/components/FBReactNativeSpec/EventEmitters.h>
#include <react/renderer/components/FBReactNativeSpec/Props.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>
#include <react/cxxstableapi/FrameworksGuard.h>

#include <react/renderer/core/graphicsConversions.h>
#include <react/renderer/graphics/Float.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>
#include <react/cxxstableapi/FrameworksGuard.h>

#include <react/renderer/graphics/Size.h>

Expand Down

This file was deleted.

Loading
Loading