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
4 changes: 4 additions & 0 deletions packages/react-native/ReactAndroid/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,12 @@ val preparePrefab by
Pair("../ReactCommon/react/renderer/css/", "react/renderer/css/"),
// react_debug
Pair("../ReactCommon/react/debug/", "react/debug/"),
Pair("../ReactCommon/react/debug/React/", "React/"),
// react_renderer_debug
Pair("../ReactCommon/react/renderer/debug/", "react/renderer/debug/"),
// react_renderer_graphics
Pair("../ReactCommon/react/renderer/graphics/", "react/renderer/graphics/"),
Pair("../ReactCommon/react/renderer/graphics/React/", "React/"),
Pair("../ReactCommon/react/renderer/graphics/platform/android/", ""),
// react_renderer_imagemanager
Pair(
Expand Down Expand Up @@ -232,6 +234,7 @@ val preparePrefab by
Pair(File(buildDir, "third-party-ndk/folly/").absolutePath, ""),
Pair(File(buildDir, "third-party-ndk/glog/exported/").absolutePath, ""),
Pair("../ReactCommon/callinvoker/", ""),
Pair("../ReactCommon/callinvoker/React/", "React/"),
Pair("../ReactCommon/cxxreact/", "cxxreact/"),
// Exported because the public cxxreact/ErrorUtils.h includes it
Pair("../ReactCommon/jserrorhandler/", "jserrorhandler/"),
Expand Down Expand Up @@ -263,6 +266,7 @@ val preparePrefab by
Pair("../ReactCommon/react/renderer/telemetry/", "react/renderer/telemetry/"),
Pair("../ReactCommon/react/renderer/uimanager/", "react/renderer/uimanager/"),
Pair("../ReactCommon/react/debug/", "react/debug/"),
Pair("../ReactCommon/react/debug/React/", "React/"),
Pair("../ReactCommon/react/cxxstableapi/", "react/cxxstableapi/"),
Pair("../ReactCommon/react/utils/", "react/utils/"),
Pair("src/main/jni/react/jni", "react/jni/"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ include(${REACT_COMMON_DIR}/cmake-utils/react-native-flags.cmake)
add_library(callinvoker INTERFACE)

target_include_directories(callinvoker INTERFACE .)
target_link_libraries(callinvoker INTERFACE react_cxxstableapi)
target_compile_reactnative_options(callinvoker INTERFACE)
target_compile_options(callinvoker INTERFACE -Wpedantic)
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ else
source[:tag] = "v#{version}"
end

header_search_paths = []

if ENV['USE_FRAMEWORKS']
header_search_paths << "\"$(PODS_TARGET_SRCROOT)/..\"" # ReactCommon, for <react/cxxstableapi/...>
end

Pod::Spec.new do |s|
s.name = "React-callinvoker"
s.version = version
Expand All @@ -26,7 +32,17 @@ Pod::Spec.new do |s|
s.platforms = min_supported_versions
s.source = source
s.source_files = podspec_sources("**/*.{cpp,h}", "**/*.h")
s.exclude_files = "React"
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => header_search_paths.join(' ') }
s.header_dir = "ReactCommon"

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

s.dependency "React-cxxstableapi"

mark_as_react_native_build(s)
end
27 changes: 27 additions & 0 deletions packages/react-native/ReactCommon/callinvoker/React/CallInvoker.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

#pragma once

// =============================================================================
// Umbrella header for the `callinvoker` module - public entry point.
//
// #include <React/CallInvoker.h>
//
// Re-exports the module's public interface headers. React Native's own code
// should keep using the fine-grained `<ReactCommon/...>` includes; only outside
// consumers use this umbrella.
// =============================================================================

// 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

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

#undef RN_UMBRELLA_CONTEXT
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>

#include "SchedulerPriority.h"

#include <functional>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>

namespace facebook::react {

enum class SchedulerPriority : int {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ add_library(react_debug OBJECT ${react_debug_SRC} ${react_debug_redbox_SRC})

target_include_directories(react_debug PUBLIC ${REACT_COMMON_DIR})

target_link_libraries(react_debug folly_runtime)
target_link_libraries(react_debug folly_runtime react_cxxstableapi)

if(ANDROID)
target_link_libraries(react_debug log)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ else
source[:tag] = "v#{version}"
end

header_search_paths = []

if ENV['USE_FRAMEWORKS']
header_search_paths << "\"$(PODS_TARGET_SRCROOT)/../..\"" # ReactCommon, for <react/cxxstableapi/...>
end

Pod::Spec.new do |s|
s.name = "React-debug"
s.version = version
Expand All @@ -28,15 +34,24 @@ Pod::Spec.new do |s|
s.source_files = podspec_sources("*.{cpp,h}", "*.h")
s.header_dir = "react/debug"
s.pod_target_xcconfig = { "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
"DEFINES_MODULE" => "YES" }
"DEFINES_MODULE" => "YES",
"HEADER_SEARCH_PATHS" => header_search_paths.join(' ') }

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

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

s.subspec "redbox" do |ss|
ss.source_files = podspec_sources("redbox/*.{cpp,h}", "redbox/*.h")
ss.exclude_files = "redbox/tests/**/*.{cpp,h}"
ss.header_dir = "react/debug/redbox"
end

s.dependency "React-cxxstableapi"

mark_as_react_native_build(s)
end
31 changes: 31 additions & 0 deletions packages/react-native/ReactCommon/react/debug/React/Debug.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

#pragma once

// =============================================================================
// Umbrella header for the `react/debug` module - public entry point.
//
// #include <React/Debug.h>
//
// Re-exports the module's public interface headers. React Native's own code
// should keep using the fine-grained `<react/debug/...>` includes; only outside
// consumers use this umbrella.
//
// The `redbox/` headers are deliberately absent: they are implementation
// details of the dev-menu red box and carry no stability guarantee.
// =============================================================================

// 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

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

#undef RN_UMBRELLA_CONTEXT
2 changes: 2 additions & 0 deletions packages/react-native/ReactCommon/react/debug/flags.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>

//
// Preprocessor flags which control whether code meant for debugging the
// internals of React Native is included in the build. E.g. debug assertions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>

#include "flags.h"

#undef react_native_assert
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>

#include "flags.h"

#undef react_native_expect
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#pragma once

#include <react/cxxstableapi/PrivateGuard.h>

#include <optional>
#include <string>
#include <vector>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#pragma once

#include <react/cxxstableapi/PrivateGuard.h>

#include <string>
#include <string_view>

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

#pragma once

#include <react/cxxstableapi/PrivateGuard.h>

#include <optional>
#include <string>

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

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>

#include <react/renderer/graphics/LinearGradient.h>
#include <react/renderer/graphics/RadialGradient.h>

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

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>

#include <react/renderer/graphics/ValueUnit.h>
#include <optional>

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

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>

namespace facebook::react {

enum class BackgroundRepeatStyle {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>

#include <react/renderer/graphics/ValueUnit.h>
#include <variant>

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

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>

#include <optional>
#include <string_view>

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

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>

#include <react/renderer/graphics/Color.h>
#include <react/renderer/graphics/Float.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ target_link_libraries(react_renderer_graphics
glog
${fbjni}
folly_runtime
react_cxxstableapi
react_debug
react_renderer_debug
react_utils
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>

#include <react/renderer/graphics/ColorComponents.h>
#include <react/renderer/graphics/HostPlatformColor.h>

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

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>

namespace facebook::react {

enum class ColorSpace { sRGB, DisplayP3 };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>

#include <react/renderer/debug/flags.h>
#include <react/renderer/graphics/Color.h>
#include <react/renderer/graphics/Float.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>

#include <react/renderer/graphics/Color.h>
#include <react/renderer/graphics/Float.h>

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

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>

#include <optional>
#include <string_view>

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

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>

#include <react/renderer/debug/flags.h>
#include <react/renderer/graphics/ColorStop.h>
#include <react/renderer/graphics/Float.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>

#include <react/renderer/graphics/Float.h>
#include <react/utils/hash_combine.h>

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

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>

#include <react/renderer/debug/flags.h>
#include <react/renderer/graphics/ColorStop.h>
#include <react/renderer/graphics/Float.h>
Expand Down
Loading
Loading