diff --git a/React/Fabric/Mounting/ComponentViews/ART/RCTARTSurfaceViewComponentView.mm b/React/Fabric/Mounting/ComponentViews/ART/RCTARTSurfaceViewComponentView.mm index 0a5e9a531d8..f8a26d871f6 100644 --- a/React/Fabric/Mounting/ComponentViews/ART/RCTARTSurfaceViewComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/ART/RCTARTSurfaceViewComponentView.mm @@ -6,7 +6,7 @@ */ #import "RCTARTSurfaceViewComponentView.h" -#import +#import #import "RCTARTSurfaceViewComponentDescriptor.h" #import "FBRCTFabricComponentsPlugins.h" diff --git a/React/Fabric/Mounting/RCTComponentViewFactory.h b/React/Fabric/Mounting/RCTComponentViewFactory.h index ee347d9cf75..638fd4e5bde 100644 --- a/React/Fabric/Mounting/RCTComponentViewFactory.h +++ b/React/Fabric/Mounting/RCTComponentViewFactory.h @@ -10,7 +10,7 @@ #import #import -#import +#import NS_ASSUME_NONNULL_BEGIN diff --git a/React/Fabric/Mounting/RCTComponentViewFactory.mm b/React/Fabric/Mounting/RCTComponentViewFactory.mm index 773eba1ccc2..e1566df29bf 100644 --- a/React/Fabric/Mounting/RCTComponentViewFactory.mm +++ b/React/Fabric/Mounting/RCTComponentViewFactory.mm @@ -13,8 +13,8 @@ #import #import +#import #import -#import #ifdef RN_DISABLE_OSS_PLUGIN_HEADER #import diff --git a/React/Fabric/Mounting/RCTComponentViewProtocol.h b/React/Fabric/Mounting/RCTComponentViewProtocol.h index 334b1bd8917..3fd2c3fccf5 100644 --- a/React/Fabric/Mounting/RCTComponentViewProtocol.h +++ b/React/Fabric/Mounting/RCTComponentViewProtocol.h @@ -8,11 +8,11 @@ #import #import +#import #import #import #import #import -#import NS_ASSUME_NONNULL_BEGIN diff --git a/React/Fabric/RCTScheduler.h b/React/Fabric/RCTScheduler.h index d0f9cda86c3..8268c6f4a7e 100644 --- a/React/Fabric/RCTScheduler.h +++ b/React/Fabric/RCTScheduler.h @@ -9,11 +9,11 @@ #import #import +#import #import #import #import #import -#import #import #import diff --git a/React/Fabric/RCTScheduler.mm b/React/Fabric/RCTScheduler.mm index e6257df16cc..c4979f27dcb 100644 --- a/React/Fabric/RCTScheduler.mm +++ b/React/Fabric/RCTScheduler.mm @@ -7,8 +7,8 @@ #import "RCTScheduler.h" +#import #import -#import #import #import diff --git a/React/Fabric/RCTSurfacePresenter.mm b/React/Fabric/RCTSurfacePresenter.mm index bf110e2e896..255d7eb5a83 100644 --- a/React/Fabric/RCTSurfacePresenter.mm +++ b/React/Fabric/RCTSurfacePresenter.mm @@ -23,11 +23,11 @@ #import #import +#import #import #import #import #import -#import #import #import #import 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 65ffaea91c4..197318dfedf 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/BUCK +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/BUCK @@ -29,6 +29,7 @@ rn_xplat_cxx_library( react_native_xplat_target("better:better"), react_native_xplat_target("config:config"), react_native_xplat_target("fabric/uimanager:uimanager"), + react_native_xplat_target("fabric/componentregistry:componentregistry"), react_native_xplat_target("fabric/components/scrollview:scrollview"), react_native_xplat_target("utils:utils"), react_native_target("jni/react/jni:jni"), diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.cpp b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.cpp index 908b0e73eab..0ed720b2af1 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.cpp +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.cpp @@ -15,12 +15,12 @@ #include #include #include +#include #include #include #include #include #include -#include #include #include #include diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/ComponentFactoryDelegate.cpp b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/ComponentFactoryDelegate.cpp index 4a722a75b9d..0f4d4c08fb6 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/ComponentFactoryDelegate.cpp +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/ComponentFactoryDelegate.cpp @@ -9,7 +9,7 @@ #include #include #include -#include +#include using namespace facebook::jsi; diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/ComponentFactoryDelegate.h b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/ComponentFactoryDelegate.h index aea2b356b1c..61ca26c85c3 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/ComponentFactoryDelegate.h +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/ComponentFactoryDelegate.h @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include #include diff --git a/ReactCommon/fabric/componentregistry/BUCK b/ReactCommon/fabric/componentregistry/BUCK new file mode 100644 index 00000000000..b5be24c5334 --- /dev/null +++ b/ReactCommon/fabric/componentregistry/BUCK @@ -0,0 +1,62 @@ +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", + "react_native_xplat_target", + "rn_xplat_cxx_library", + "subdir_glob", +) + +APPLE_COMPILER_FLAGS = get_apple_compiler_flags() + +rn_xplat_cxx_library( + name = "componentregistry", + srcs = glob( + ["**/*.cpp"], + exclude = glob(["tests/**/*.cpp"]), + ), + headers = glob( + ["**/*.h"], + exclude = glob(["tests/**/*.h"]), + ), + header_namespace = "", + exported_headers = subdir_glob( + [ + ("", "*.h"), + ], + prefix = "react/componentregistry", + ), + compiler_flags = [ + "-fexceptions", + "-frtti", + "-std=c++14", + "-Wall", + ], + fbobjc_compiler_flags = APPLE_COMPILER_FLAGS, + 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", + ], + visibility = ["PUBLIC"], + deps = [ + "//xplat/fbsystrace:fbsystrace", + "//xplat/folly:headers_only", + "//xplat/folly:memory", + "//xplat/folly:molly", + "//xplat/jsi:JSIDynamic", + "//xplat/jsi:jsi", + "//xplat/third-party/glog:glog", + react_native_xplat_target("fabric/core:core"), + react_native_xplat_target("fabric/debug:debug"), + react_native_xplat_target("utils:utils"), + ], +) diff --git a/ReactCommon/fabric/uimanager/ComponentDescriptorFactory.h b/ReactCommon/fabric/componentregistry/ComponentDescriptorFactory.h similarity index 100% rename from ReactCommon/fabric/uimanager/ComponentDescriptorFactory.h rename to ReactCommon/fabric/componentregistry/ComponentDescriptorFactory.h diff --git a/ReactCommon/fabric/uimanager/ComponentDescriptorProvider.h b/ReactCommon/fabric/componentregistry/ComponentDescriptorProvider.h similarity index 100% rename from ReactCommon/fabric/uimanager/ComponentDescriptorProvider.h rename to ReactCommon/fabric/componentregistry/ComponentDescriptorProvider.h diff --git a/ReactCommon/fabric/uimanager/ComponentDescriptorProviderRegistry.cpp b/ReactCommon/fabric/componentregistry/ComponentDescriptorProviderRegistry.cpp similarity index 100% rename from ReactCommon/fabric/uimanager/ComponentDescriptorProviderRegistry.cpp rename to ReactCommon/fabric/componentregistry/ComponentDescriptorProviderRegistry.cpp diff --git a/ReactCommon/fabric/uimanager/ComponentDescriptorProviderRegistry.h b/ReactCommon/fabric/componentregistry/ComponentDescriptorProviderRegistry.h similarity index 94% rename from ReactCommon/fabric/uimanager/ComponentDescriptorProviderRegistry.h rename to ReactCommon/fabric/componentregistry/ComponentDescriptorProviderRegistry.h index fb8e5ee4512..40be7eb6ad0 100644 --- a/ReactCommon/fabric/uimanager/ComponentDescriptorProviderRegistry.h +++ b/ReactCommon/fabric/componentregistry/ComponentDescriptorProviderRegistry.h @@ -9,9 +9,9 @@ #include +#include +#include #include -#include -#include namespace facebook { namespace react { diff --git a/ReactCommon/fabric/uimanager/ComponentDescriptorRegistry.cpp b/ReactCommon/fabric/componentregistry/ComponentDescriptorRegistry.cpp similarity index 98% rename from ReactCommon/fabric/uimanager/ComponentDescriptorRegistry.cpp rename to ReactCommon/fabric/componentregistry/ComponentDescriptorRegistry.cpp index 778f32fbde3..b85cf63661a 100644 --- a/ReactCommon/fabric/uimanager/ComponentDescriptorRegistry.cpp +++ b/ReactCommon/fabric/componentregistry/ComponentDescriptorRegistry.cpp @@ -7,9 +7,8 @@ #include "ComponentDescriptorRegistry.h" +#include #include -#include -#include namespace facebook { namespace react { diff --git a/ReactCommon/fabric/uimanager/ComponentDescriptorRegistry.h b/ReactCommon/fabric/componentregistry/ComponentDescriptorRegistry.h similarity index 97% rename from ReactCommon/fabric/uimanager/ComponentDescriptorRegistry.h rename to ReactCommon/fabric/componentregistry/ComponentDescriptorRegistry.h index 26ff94ea170..3f25839bf5c 100644 --- a/ReactCommon/fabric/uimanager/ComponentDescriptorRegistry.h +++ b/ReactCommon/fabric/componentregistry/ComponentDescriptorRegistry.h @@ -12,8 +12,8 @@ #include #include +#include #include -#include namespace facebook { namespace react { diff --git a/ReactCommon/fabric/components/modal/BUCK b/ReactCommon/fabric/components/modal/BUCK index 7beb9ec18d8..070a02cb849 100644 --- a/ReactCommon/fabric/components/modal/BUCK +++ b/ReactCommon/fabric/components/modal/BUCK @@ -84,6 +84,7 @@ rn_xplat_cxx_library( react_native_xplat_target("fabric/graphics:graphics"), react_native_xplat_target("fabric/imagemanager:imagemanager"), react_native_xplat_target("fabric/uimanager:uimanager"), + react_native_xplat_target("fabric/componentregistry:componentregistry"), "//xplat/js/react-native-github:generated_components-rncore", ], ) diff --git a/ReactCommon/fabric/components/picker/BUCK b/ReactCommon/fabric/components/picker/BUCK index 82604cfca44..829f5adec8f 100644 --- a/ReactCommon/fabric/components/picker/BUCK +++ b/ReactCommon/fabric/components/picker/BUCK @@ -65,6 +65,7 @@ rn_xplat_cxx_library( react_native_xplat_target("fabric/graphics:graphics"), react_native_xplat_target("fabric/components/view:view"), react_native_xplat_target("fabric/uimanager:uimanager"), + react_native_xplat_target("fabric/componentregistry:componentregistry"), "//xplat/js/react-native-github:generated_components-rncore", ], ) diff --git a/ReactCommon/fabric/components/slider/BUCK b/ReactCommon/fabric/components/slider/BUCK index a661fdbb4f4..52f567d985a 100644 --- a/ReactCommon/fabric/components/slider/BUCK +++ b/ReactCommon/fabric/components/slider/BUCK @@ -93,6 +93,7 @@ rn_xplat_cxx_library( react_native_xplat_target("fabric/graphics:graphics"), react_native_xplat_target("fabric/imagemanager:imagemanager"), react_native_xplat_target("fabric/uimanager:uimanager"), + react_native_xplat_target("fabric/componentregistry:componentregistry"), "//xplat/js/react-native-github:generated_components-rncore", ], ) diff --git a/ReactCommon/fabric/components/switch/BUCK b/ReactCommon/fabric/components/switch/BUCK index 7aece1971a7..f5b4493c5de 100644 --- a/ReactCommon/fabric/components/switch/BUCK +++ b/ReactCommon/fabric/components/switch/BUCK @@ -66,6 +66,7 @@ rn_xplat_cxx_library( react_native_xplat_target("fabric/graphics:graphics"), react_native_xplat_target("fabric/components/view:view"), react_native_xplat_target("fabric/uimanager:uimanager"), + react_native_xplat_target("fabric/componentregistry:componentregistry"), "//xplat/js/react-native-github:generated_components-rncore", ], ) diff --git a/ReactCommon/fabric/components/text/BUCK b/ReactCommon/fabric/components/text/BUCK index 6ea5e080c86..c32ad04dfc4 100644 --- a/ReactCommon/fabric/components/text/BUCK +++ b/ReactCommon/fabric/components/text/BUCK @@ -69,6 +69,7 @@ rn_xplat_cxx_library( react_native_xplat_target("fabric/textlayoutmanager:textlayoutmanager"), react_native_xplat_target("fabric/components/view:view"), react_native_xplat_target("fabric/uimanager:uimanager"), + react_native_xplat_target("fabric/componentregistry:componentregistry"), ], ) diff --git a/ReactCommon/fabric/components/textinput/BUCK b/ReactCommon/fabric/components/textinput/BUCK index 448cbe3e532..aa630a15ac7 100644 --- a/ReactCommon/fabric/components/textinput/BUCK +++ b/ReactCommon/fabric/components/textinput/BUCK @@ -68,6 +68,7 @@ rn_xplat_cxx_library( react_native_xplat_target("fabric/components/view:view"), react_native_xplat_target("fabric/components/image:image"), react_native_xplat_target("fabric/uimanager:uimanager"), + react_native_xplat_target("fabric/componentregistry:componentregistry"), react_native_xplat_target("fabric/imagemanager:imagemanager"), ], ) diff --git a/ReactCommon/fabric/components/textinput/iostextinput/BUCK b/ReactCommon/fabric/components/textinput/iostextinput/BUCK index 94b321c61a6..d6baec266ab 100644 --- a/ReactCommon/fabric/components/textinput/iostextinput/BUCK +++ b/ReactCommon/fabric/components/textinput/iostextinput/BUCK @@ -68,6 +68,7 @@ rn_xplat_cxx_library( react_native_xplat_target("fabric/components/view:view"), react_native_xplat_target("fabric/components/image:image"), react_native_xplat_target("fabric/uimanager:uimanager"), + react_native_xplat_target("fabric/componentregistry:componentregistry"), react_native_xplat_target("fabric/imagemanager:imagemanager"), ], ) diff --git a/ReactCommon/fabric/components/view/tests/ViewTest.cpp b/ReactCommon/fabric/components/view/tests/ViewTest.cpp index 32aff667905..2224bc68294 100644 --- a/ReactCommon/fabric/components/view/tests/ViewTest.cpp +++ b/ReactCommon/fabric/components/view/tests/ViewTest.cpp @@ -10,13 +10,13 @@ #include +#include #include #include #include #include #include #include -#include namespace facebook { namespace react { diff --git a/ReactCommon/fabric/core/tests/ShadowNodeFamilyTest.cpp b/ReactCommon/fabric/core/tests/ShadowNodeFamilyTest.cpp index b5737b4b241..26f5c861fa2 100644 --- a/ReactCommon/fabric/core/tests/ShadowNodeFamilyTest.cpp +++ b/ReactCommon/fabric/core/tests/ShadowNodeFamilyTest.cpp @@ -9,10 +9,10 @@ #include +#include #include #include #include -#include using namespace facebook::react; diff --git a/ReactCommon/fabric/element/BUCK b/ReactCommon/fabric/element/BUCK index 85428f8bd7d..f7fce793547 100644 --- a/ReactCommon/fabric/element/BUCK +++ b/ReactCommon/fabric/element/BUCK @@ -57,6 +57,7 @@ rn_xplat_cxx_library( react_native_xplat_target("fabric/components/scrollview:scrollview"), react_native_xplat_target("fabric/components/text:text"), react_native_xplat_target("fabric/uimanager:uimanager"), + react_native_xplat_target("fabric/componentregistry:componentregistry"), react_native_xplat_target("fabric/core:core"), react_native_xplat_target("fabric/debug:debug"), react_native_xplat_target("utils:utils"), diff --git a/ReactCommon/fabric/element/ComponentBuilder.h b/ReactCommon/fabric/element/ComponentBuilder.h index 9e015665ec1..cafbaaa019c 100644 --- a/ReactCommon/fabric/element/ComponentBuilder.h +++ b/ReactCommon/fabric/element/ComponentBuilder.h @@ -9,11 +9,11 @@ #include +#include #include #include #include #include -#include #include #include diff --git a/ReactCommon/fabric/element/testUtils.h b/ReactCommon/fabric/element/testUtils.h index 008786913c1..2c32cbd60e8 100644 --- a/ReactCommon/fabric/element/testUtils.h +++ b/ReactCommon/fabric/element/testUtils.h @@ -7,6 +7,7 @@ #pragma once +#include #include #include #include @@ -14,7 +15,6 @@ #include #include #include -#include namespace facebook { namespace react { diff --git a/ReactCommon/fabric/element/tests/ElementTest.cpp b/ReactCommon/fabric/element/tests/ElementTest.cpp index 0a0a09b015e..3ed6c7f8fcc 100644 --- a/ReactCommon/fabric/element/tests/ElementTest.cpp +++ b/ReactCommon/fabric/element/tests/ElementTest.cpp @@ -9,12 +9,12 @@ #include +#include #include #include #include #include #include -#include using namespace facebook::react; diff --git a/ReactCommon/fabric/textlayoutmanager/BUCK b/ReactCommon/fabric/textlayoutmanager/BUCK index ff90396790b..ba629ee3949 100644 --- a/ReactCommon/fabric/textlayoutmanager/BUCK +++ b/ReactCommon/fabric/textlayoutmanager/BUCK @@ -129,6 +129,7 @@ rn_xplat_cxx_library( react_native_xplat_target("fabric/debug:debug"), react_native_xplat_target("fabric/graphics:graphics"), react_native_xplat_target("fabric/uimanager:uimanager"), + react_native_xplat_target("fabric/componentregistry:componentregistry"), ], ) diff --git a/ReactCommon/fabric/uimanager/BUCK b/ReactCommon/fabric/uimanager/BUCK index b9bae06f580..e2bdd3b4c26 100644 --- a/ReactCommon/fabric/uimanager/BUCK +++ b/ReactCommon/fabric/uimanager/BUCK @@ -61,6 +61,7 @@ rn_xplat_cxx_library( react_native_xplat_target("fabric/components/view:view"), react_native_xplat_target("fabric/mounting:mounting"), 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"), ], diff --git a/ReactCommon/fabric/uimanager/Scheduler.cpp b/ReactCommon/fabric/uimanager/Scheduler.cpp index 6b9c47f7a93..6a8133f20a3 100644 --- a/ReactCommon/fabric/uimanager/Scheduler.cpp +++ b/ReactCommon/fabric/uimanager/Scheduler.cpp @@ -10,9 +10,9 @@ #include #include +#include #include #include -#include #include #include #include diff --git a/ReactCommon/fabric/uimanager/Scheduler.h b/ReactCommon/fabric/uimanager/Scheduler.h index 31f40b474b5..0cf62b7622b 100644 --- a/ReactCommon/fabric/uimanager/Scheduler.h +++ b/ReactCommon/fabric/uimanager/Scheduler.h @@ -10,12 +10,12 @@ #include #include +#include +#include #include #include #include #include -#include -#include #include #include #include diff --git a/ReactCommon/fabric/uimanager/SchedulerToolbox.h b/ReactCommon/fabric/uimanager/SchedulerToolbox.h index 0ffa322acab..1862f1889fd 100644 --- a/ReactCommon/fabric/uimanager/SchedulerToolbox.h +++ b/ReactCommon/fabric/uimanager/SchedulerToolbox.h @@ -7,8 +7,8 @@ #pragma once +#include #include -#include #include #include diff --git a/ReactCommon/fabric/uimanager/UIManager.h b/ReactCommon/fabric/uimanager/UIManager.h index db882e3aec2..7d282d43836 100644 --- a/ReactCommon/fabric/uimanager/UIManager.h +++ b/ReactCommon/fabric/uimanager/UIManager.h @@ -11,12 +11,12 @@ #include #include +#include #include #include #include #include #include -#include #include namespace facebook { diff --git a/ReactCommon/fabric/uimanager/UITemplateProcessor.h b/ReactCommon/fabric/uimanager/UITemplateProcessor.h index dff902334b7..4f9a892acf9 100644 --- a/ReactCommon/fabric/uimanager/UITemplateProcessor.h +++ b/ReactCommon/fabric/uimanager/UITemplateProcessor.h @@ -11,9 +11,9 @@ #include +#include #include #include -#include #include namespace facebook { diff --git a/ReactCommon/fabric/uimanager/tests/UITemplateProcessorTest.cpp b/ReactCommon/fabric/uimanager/tests/UITemplateProcessorTest.cpp index 3339afa17e2..b1d2d97e85f 100644 --- a/ReactCommon/fabric/uimanager/tests/UITemplateProcessorTest.cpp +++ b/ReactCommon/fabric/uimanager/tests/UITemplateProcessorTest.cpp @@ -9,18 +9,18 @@ #include #include -#include +#include #include using namespace facebook::react; +#include +#include +#include #include #include #include #include -#include -#include -#include #include namespace facebook {