diff --git a/React/Fabric/RCTSurfacePresenter.h b/React/Fabric/RCTSurfacePresenter.h index a5e8f79632b..abacc2f7471 100644 --- a/React/Fabric/RCTSurfacePresenter.h +++ b/React/Fabric/RCTSurfacePresenter.h @@ -10,8 +10,8 @@ #import #import #import +#import #import -#import NS_ASSUME_NONNULL_BEGIN diff --git a/React/Fabric/RCTSurfacePresenterBridgeAdapter.mm b/React/Fabric/RCTSurfacePresenterBridgeAdapter.mm index 3a97f969a20..307e6aff299 100644 --- a/React/Fabric/RCTSurfacePresenterBridgeAdapter.mm +++ b/React/Fabric/RCTSurfacePresenterBridgeAdapter.mm @@ -17,9 +17,9 @@ #import #import +#import #import #import -#import using namespace facebook::react; diff --git a/React/Fabric/Utils/MainRunLoopEventBeat.h b/React/Fabric/Utils/MainRunLoopEventBeat.h index 055728e322b..eeb2aeea453 100644 --- a/React/Fabric/Utils/MainRunLoopEventBeat.h +++ b/React/Fabric/Utils/MainRunLoopEventBeat.h @@ -9,8 +9,8 @@ #include #include +#include #include -#include namespace facebook { namespace react { diff --git a/React/Fabric/Utils/RuntimeEventBeat.h b/React/Fabric/Utils/RuntimeEventBeat.h index bc95c141ea9..d55980f40c6 100644 --- a/React/Fabric/Utils/RuntimeEventBeat.h +++ b/React/Fabric/Utils/RuntimeEventBeat.h @@ -7,8 +7,8 @@ #include #include +#include #include -#include namespace facebook { namespace react { diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/BUCK b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/BUCK index fc4d7c9c768..3023a149847 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/BUCK +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/BUCK @@ -32,7 +32,7 @@ rn_xplat_cxx_library( react_native_xplat_target("fabric/scheduler:scheduler"), react_native_xplat_target("fabric/componentregistry:componentregistry"), react_native_xplat_target("fabric/components/scrollview:scrollview"), - react_native_xplat_target("utils:utils"), + react_native_xplat_target("runtimeexecutor:runtimeexecutor"), react_native_target("jni/react/jni:jni"), "//xplat/fbsystrace:fbsystrace", "//xplat/folly:molly", diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/EventBeatManager.h b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/EventBeatManager.h index 5a36037c7d3..5ed943f226c 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/EventBeatManager.h +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/EventBeatManager.h @@ -10,9 +10,9 @@ #include #include +#include #include #include -#include namespace facebook { namespace react { diff --git a/ReactCommon/fabric/scheduler/Scheduler.h b/ReactCommon/fabric/scheduler/Scheduler.h index 59e91c5dfa7..fe1d9c09809 100644 --- a/ReactCommon/fabric/scheduler/Scheduler.h +++ b/ReactCommon/fabric/scheduler/Scheduler.h @@ -10,6 +10,7 @@ #include #include +#include #include #include #include @@ -21,7 +22,6 @@ #include #include #include -#include namespace facebook { namespace react { diff --git a/ReactCommon/fabric/scheduler/SchedulerToolbox.h b/ReactCommon/fabric/scheduler/SchedulerToolbox.h index 1862f1889fd..87462d89377 100644 --- a/ReactCommon/fabric/scheduler/SchedulerToolbox.h +++ b/ReactCommon/fabric/scheduler/SchedulerToolbox.h @@ -7,10 +7,10 @@ #pragma once +#include #include #include #include -#include namespace facebook { namespace react { diff --git a/ReactCommon/fabric/uimanager/BUCK b/ReactCommon/fabric/uimanager/BUCK index e2bdd3b4c26..837f71a35ce 100644 --- a/ReactCommon/fabric/uimanager/BUCK +++ b/ReactCommon/fabric/uimanager/BUCK @@ -63,7 +63,7 @@ rn_xplat_cxx_library( react_native_xplat_target("fabric/core:core"), react_native_xplat_target("fabric/componentregistry:componentregistry"), react_native_xplat_target("fabric/debug:debug"), - react_native_xplat_target("utils:utils"), + react_native_xplat_target("runtimeexecutor:runtimeexecutor"), ], ) diff --git a/ReactCommon/runtimeexecutor/.clang-tidy b/ReactCommon/runtimeexecutor/.clang-tidy new file mode 100644 index 00000000000..c98fd78ff64 --- /dev/null +++ b/ReactCommon/runtimeexecutor/.clang-tidy @@ -0,0 +1,5 @@ +--- +Checks: '> +clang-diagnostic-*, +' +... diff --git a/ReactCommon/runtimeexecutor/BUCK b/ReactCommon/runtimeexecutor/BUCK new file mode 100644 index 00000000000..561b4c8d208 --- /dev/null +++ b/ReactCommon/runtimeexecutor/BUCK @@ -0,0 +1,53 @@ +load("@fbsource//tools/build_defs/apple:flag_defs.bzl", "get_preprocessor_flags_for_build_mode") +load( + "//tools/build_defs/oss:rn_defs.bzl", + "ANDROID", + "APPLE", + "CXX", + "get_apple_compiler_flags", + "get_apple_inspector_flags", + "rn_xplat_cxx_library", +) + +APPLE_COMPILER_FLAGS = get_apple_compiler_flags() + +rn_xplat_cxx_library( + name = "runtimeexecutor", + srcs = glob( + [ + "**/*.cpp", + "**/*.mm", + ], + exclude = glob(["tests/**/*.cpp"]), + ), + headers = glob( + ["**/*.h"], + exclude = glob(["tests/**/*.h"]), + ), + header_namespace = "", + exported_headers = { + "ReactCommon/RuntimeExecutor.h": "ReactCommon/RuntimeExecutor.h", + }, + compiler_flags = [ + "-fexceptions", + "-frtti", + "-std=c++14", + "-Wall", + ], + fbobjc_compiler_flags = APPLE_COMPILER_FLAGS, + fbobjc_frameworks = ["Foundation"], + fbobjc_labels = ["supermodule:ios/default/public.react_native.infra"], + fbobjc_preprocessor_flags = get_preprocessor_flags_for_build_mode() + get_apple_inspector_flags(), + force_static = True, + macosx_tests_override = [], + platforms = (ANDROID, APPLE, CXX), + preprocessor_flags = [ + "-DLOG_TAG=\"ReactNative\"", + "-DWITH_FBSYSTRACE=1", + ], + tests = [], + visibility = ["PUBLIC"], + deps = [ + "//xplat/jsi:jsi", + ], +) diff --git a/ReactCommon/utils/RuntimeExecutor.h b/ReactCommon/runtimeexecutor/ReactCommon/RuntimeExecutor.h similarity index 100% rename from ReactCommon/utils/RuntimeExecutor.h rename to ReactCommon/runtimeexecutor/ReactCommon/RuntimeExecutor.h