From 224c85a0ba57cd8eb4bd9d95ee9ca3ca398a3d70 Mon Sep 17 00:00:00 2001 From: empyrical Date: Tue, 22 Dec 2020 08:33:56 -0800 Subject: [PATCH] Update iOS Fabric-related files to compile on OSS (#29810) Summary: Original PR contents: This pull request updates the Podspecs and associated build scripts, and some source files so they build on OSS. RNTester now compiles with `fabric_enabled` again. The following changes have been made: * Various spots that were pointing to the old `ReactCommon/fabric` location have now been updated to `ReactCommon/react/renderer` * Files that were attempting to use internal FB header `FBRCTFabricComponentsPlugins.h` were changed to use `RCTFabricComponentsPlugins.h` * `RCTFabricComponentsPlugins` in OSS was updated to include the `Image` fabric component (thanks tsapeta) * Replaced old `generate-rncore.sh` build script with new `generate-rncore.js` script which does not require `flow-node` and uses the `react-native-codegen` API directly, so there is no longer any need for an interim `schema-rncore.json` file. * Updated Yoga podspec which wasn't fully synced with changes from the main Yoga repo * Updated Fabric podspec with additional needed subspecs Additions to PR by hramos: * Replaced use of generate-rncore scripts with the original generate-native-modules-specs.sh script, which is now generate-specs.sh and supports both codegen for Native Modules and Components now (TurboModules/Fabric). * Codegen now runs at build time as part of the Xcode build pipeline instead of as part of `pod install`. The build script is injected by the FBReactNativeSpec pod, as the pod is part of both Fabric and non-Fabric builds. [General] [Fixed] - RNTester compiles with `fabric_enabled` again Pull Request resolved: https://github.com/facebook/react-native/pull/29810 Test Plan: RNTester now compiles and runs in the simulator again when `fabric_enabled` is set to `true`. ``` cd xplat/js/react-native-github/packages/rn-tester USE_FABRIC=1 pod install open RNTesterPods.xcworkspace ``` Reviewed By: fkgozali Differential Revision: D24058507 Pulled By: hramos fbshipit-source-id: 8b2ea3694e6cb9aa23f83f087e2995fd4320e2bb --- .gitignore | 3 +- .../FBReactNativeSpec.podspec | 29 ++- .../RCTActivityIndicatorViewComponentView.mm | 2 +- .../Picker/RCTPickerComponentView.mm | 2 +- .../RCTFabricComponentsPlugins.h | 1 + .../RCTFabricComponentsPlugins.mm | 1 + .../RCTSafeAreaViewComponentView.mm | 1 - .../RCTPullToRefreshViewComponentView.mm | 2 +- .../Slider/RCTSliderComponentView.mm | 2 +- .../Switch/RCTSwitchComponentView.mm | 2 +- .../RCTUnimplementedViewComponentView.mm | 2 +- React/React-RCTFabric.podspec | 10 +- ReactCommon/React-Fabric.podspec | 195 +++++++++++------- .../renderer/graphics/React-graphics.podspec | 14 +- ReactCommon/yoga/Yoga.podspec | 2 +- package.json | 4 +- .../plugin/CodegenPluginExtension.java | 2 +- packages/rn-tester/Podfile | 18 +- packages/rn-tester/Podfile.lock | 6 +- scripts/generate-rncore.sh | 14 -- ...les-specs-cli.js => generate-specs-cli.js} | 2 +- ...ive-modules-specs.sh => generate-specs.sh} | 41 ++-- scripts/react_native_pods.rb | 2 +- 23 files changed, 209 insertions(+), 148 deletions(-) delete mode 100755 scripts/generate-rncore.sh rename scripts/{generate-native-modules-specs-cli.js => generate-specs-cli.js} (97%) rename scripts/{generate-native-modules-specs.sh => generate-specs.sh} (65%) diff --git a/.gitignore b/.gitignore index 7dd758b61058ae..e71831ae100198 100644 --- a/.gitignore +++ b/.gitignore @@ -102,8 +102,7 @@ package-lock.json # react-native-codegen /Libraries/FBReactNativeSpec/FBReactNativeSpec /packages/react-native-codegen/lib -/ReactCommon/fabric/components/rncore/ -/schema-rncore.json +/ReactCommon/react/renderer/components/rncore/ # Visual studio .vscode diff --git a/Libraries/FBReactNativeSpec/FBReactNativeSpec.podspec b/Libraries/FBReactNativeSpec/FBReactNativeSpec.podspec index 70e90d54ea439e..79493bdca4ebec 100644 --- a/Libraries/FBReactNativeSpec/FBReactNativeSpec.podspec +++ b/Libraries/FBReactNativeSpec/FBReactNativeSpec.podspec @@ -20,11 +20,27 @@ end react_native_path = File.join(__dir__, "..", "..") srcs_dir = File.join(__dir__, "..") -codegen_script_path = File.join(react_native_path, "scripts", "generate-native-modules-specs.sh") +codegen_script_path = File.join(react_native_path, "scripts", "generate-specs.sh") codegen_path = File.join(react_native_path, codegen_path_prefix, "react-native-codegen") -output_dir = File.join(__dir__, "FBReactNativeSpec") -generated_files = [File.join(output_dir, "FBReactNativeSpec.h"), File.join(output_dir, "FBReactNativeSpec-generated.mm")] codegen_command = "CODEGEN_PATH=#{codegen_path} sh '#{codegen_script_path}' | tee \"${SCRIPT_OUTPUT_FILE_0}\"" +modules_output_dir = File.join(__dir__, "FBReactNativeSpec") +components_output_dir = File.join(react_native_path, "ReactCommon", "react", "renderer", "components", "rncore") +generated_filenames = [ "FBReactNativeSpec.h", "FBReactNativeSpec-generated.mm" ] +generated_files = generated_filenames.map { |filename| File.join(modules_output_dir, filename) } + +if ENV['USE_FABRIC'] == '1' + components_generated_filenames = [ + "ComponentDescriptors.h", + "EventEmitters.cpp", + "EventEmitters.h", + "Props.cpp", + "Props.h", + "RCTComponentViewHelpers.h", + "ShadowNodes.cpp", + "ShadowNodes.h" + ] + generated_files = generated_files.concat(components_generated_filenames.map { |filename| File.join(components_output_dir, filename) }) +end folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32' folly_version = '2020.01.13.00' @@ -40,6 +56,7 @@ Pod::Spec.new do |s| s.compiler_flags = folly_compiler_flags + ' -Wno-nullability-completeness' s.source = source s.source_files = "**/*.{c,h,m,mm,cpp}" + s.exclude_files = "jni" s.header_dir = "FBReactNativeSpec" s.pod_target_xcconfig = { @@ -55,11 +72,11 @@ Pod::Spec.new do |s| s.dependency "React-jsi", version s.dependency "ReactCommon/turbomodule/core", version - s.prepare_command = "mkdir -p #{output_dir} && touch #{generated_files.reduce() { |str, file| str + " " + file }}" + s.prepare_command = "mkdir -p #{modules_output_dir} #{components_output_dir} && touch #{generated_files.reduce() { |str, file| str + " " + file }}" s.script_phase = { - :name => 'Generate Native Modules Code', + :name => 'Generate Specs', :input_files => [srcs_dir], - :output_files => ["$(DERIVED_FILE_DIR)/FBReactNativeSpec-codegen.log"], + :output_files => ["$(DERIVED_FILE_DIR)/codegen.log"], :script => codegen_command, :execution_position => :before_compile } diff --git a/React/Fabric/Mounting/ComponentViews/ActivityIndicator/RCTActivityIndicatorViewComponentView.mm b/React/Fabric/Mounting/ComponentViews/ActivityIndicator/RCTActivityIndicatorViewComponentView.mm index 7b5a56999ed8be..f5c0a1e421deb8 100644 --- a/React/Fabric/Mounting/ComponentViews/ActivityIndicator/RCTActivityIndicatorViewComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/ActivityIndicator/RCTActivityIndicatorViewComponentView.mm @@ -13,7 +13,7 @@ #import #import -#import "FBRCTFabricComponentsPlugins.h" +#import "RCTFabricComponentsPlugins.h" using namespace facebook::react; diff --git a/React/Fabric/Mounting/ComponentViews/Picker/RCTPickerComponentView.mm b/React/Fabric/Mounting/ComponentViews/Picker/RCTPickerComponentView.mm index d1a2037473a78d..d318e34984199c 100644 --- a/React/Fabric/Mounting/ComponentViews/Picker/RCTPickerComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/Picker/RCTPickerComponentView.mm @@ -15,8 +15,8 @@ #import #import -#import "FBRCTFabricComponentsPlugins.h" #import "RCTConversions.h" +#import "RCTFabricComponentsPlugins.h" using namespace facebook::react; diff --git a/React/Fabric/Mounting/ComponentViews/RCTFabricComponentsPlugins.h b/React/Fabric/Mounting/ComponentViews/RCTFabricComponentsPlugins.h index 47cd8759fab861..b0b82ba221b55a 100644 --- a/React/Fabric/Mounting/ComponentViews/RCTFabricComponentsPlugins.h +++ b/React/Fabric/Mounting/ComponentViews/RCTFabricComponentsPlugins.h @@ -41,6 +41,7 @@ Class RCTParagraphCls(void) __attribute__((used)); Class RCTTextInputCls(void) __attribute__((used)); Class RCTInputAccessoryCls(void) __attribute__((used)); Class RCTViewCls(void) __attribute__((used)); +Class RCTImageCls(void) __attribute__((used)); #ifdef __cplusplus } diff --git a/React/Fabric/Mounting/ComponentViews/RCTFabricComponentsPlugins.mm b/React/Fabric/Mounting/ComponentViews/RCTFabricComponentsPlugins.mm index e5ed57f33af978..bad4843193a66c 100644 --- a/React/Fabric/Mounting/ComponentViews/RCTFabricComponentsPlugins.mm +++ b/React/Fabric/Mounting/ComponentViews/RCTFabricComponentsPlugins.mm @@ -30,6 +30,7 @@ {"TextInput", RCTTextInputCls}, {"InputAccessoryView", RCTInputAccessoryCls}, {"View", RCTViewCls}, + {"Image", RCTImageCls}, }; auto p = sFabricComponentsClassMap.find(name); diff --git a/React/Fabric/Mounting/ComponentViews/SafeAreaView/RCTSafeAreaViewComponentView.mm b/React/Fabric/Mounting/ComponentViews/SafeAreaView/RCTSafeAreaViewComponentView.mm index 7623c1099f93b0..b4be9fb09bee66 100644 --- a/React/Fabric/Mounting/ComponentViews/SafeAreaView/RCTSafeAreaViewComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/SafeAreaView/RCTSafeAreaViewComponentView.mm @@ -10,7 +10,6 @@ #import #import #import -#import "FBRCTFabricComponentsPlugins.h" #import "RCTConversions.h" #import "RCTFabricComponentsPlugins.h" diff --git a/React/Fabric/Mounting/ComponentViews/ScrollView/RCTPullToRefreshViewComponentView.mm b/React/Fabric/Mounting/ComponentViews/ScrollView/RCTPullToRefreshViewComponentView.mm index afcec45afa68cc..6d89e699307df8 100644 --- a/React/Fabric/Mounting/ComponentViews/ScrollView/RCTPullToRefreshViewComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/ScrollView/RCTPullToRefreshViewComponentView.mm @@ -16,7 +16,7 @@ #import #import -#import "FBRCTFabricComponentsPlugins.h" +#import "RCTFabricComponentsPlugins.h" using namespace facebook::react; diff --git a/React/Fabric/Mounting/ComponentViews/Slider/RCTSliderComponentView.mm b/React/Fabric/Mounting/ComponentViews/Slider/RCTSliderComponentView.mm index af62366caa3be3..f9c4d89f9b10d9 100644 --- a/React/Fabric/Mounting/ComponentViews/Slider/RCTSliderComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/Slider/RCTSliderComponentView.mm @@ -15,7 +15,7 @@ #import #import -#import "FBRCTFabricComponentsPlugins.h" +#import "RCTFabricComponentsPlugins.h" using namespace facebook::react; diff --git a/React/Fabric/Mounting/ComponentViews/Switch/RCTSwitchComponentView.mm b/React/Fabric/Mounting/ComponentViews/Switch/RCTSwitchComponentView.mm index e680a25ba2827f..970414806e1cd9 100644 --- a/React/Fabric/Mounting/ComponentViews/Switch/RCTSwitchComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/Switch/RCTSwitchComponentView.mm @@ -14,7 +14,7 @@ #import #import -#import "FBRCTFabricComponentsPlugins.h" +#import "RCTFabricComponentsPlugins.h" using namespace facebook::react; diff --git a/React/Fabric/Mounting/ComponentViews/UnimplementedView/RCTUnimplementedViewComponentView.mm b/React/Fabric/Mounting/ComponentViews/UnimplementedView/RCTUnimplementedViewComponentView.mm index d7eaa6c62a54fc..04e426d7ab9e5b 100644 --- a/React/Fabric/Mounting/ComponentViews/UnimplementedView/RCTUnimplementedViewComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/UnimplementedView/RCTUnimplementedViewComponentView.mm @@ -16,7 +16,7 @@ #import -#import "FBRCTFabricComponentsPlugins.h" +#import "RCTFabricComponentsPlugins.h" using namespace facebook::react; diff --git a/React/React-RCTFabric.podspec b/React/React-RCTFabric.podspec index bca122846f75b0..833d67cd364e56 100644 --- a/React/React-RCTFabric.podspec +++ b/React/React-RCTFabric.podspec @@ -30,8 +30,7 @@ Pod::Spec.new do |s| s.author = "Facebook, Inc. and its affiliates" s.platforms = { :ios => "10.0" } s.source = source - s.source_files = "Fabric/**/*.{c,h,m,mm,S,cpp}", - "Tests/**/*.{mm}" + s.source_files = "Fabric/**/*.{c,h,m,mm,S,cpp}" s.exclude_files = "**/tests/*", "**/android/*", s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags @@ -45,5 +44,10 @@ Pod::Spec.new do |s| s.dependency "React-Core", version s.dependency "React-Fabric", version s.dependency "React-RCTImage", version - s.dependency "Folly/Fabric", folly_version + s.dependency "RCT-Folly/Fabric", folly_version + + s.test_spec 'Tests' do |test_spec| + test_spec.source_files = "Tests/**/*.{mm}" + test_spec.framework = "XCTest" + end end diff --git a/ReactCommon/React-Fabric.podspec b/ReactCommon/React-Fabric.podspec index 0bf38ed0c2f62a..5ffcdd2153741f 100644 --- a/ReactCommon/React-Fabric.podspec +++ b/ReactCommon/React-Fabric.podspec @@ -18,7 +18,7 @@ end folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32' folly_version = '2020.01.13.00' -folly_dep_name = 'Folly/Fabric' +folly_dep_name = 'RCT-Folly/Fabric' boost_compiler_flags = '-Wno-documentation' Pod::Spec.new do |s| @@ -30,7 +30,6 @@ Pod::Spec.new do |s| s.author = "Facebook, Inc. and its affiliates" s.platforms = { :ios => "10.0" } s.source = source - s.prepare_command = File.read("../scripts/generate-rncore.sh") s.source_files = "dummyFile.cpp" s.library = "stdc++" s.pod_target_xcconfig = { "USE_HEADERMAP" => "YES", @@ -44,12 +43,21 @@ Pod::Spec.new do |s| s.dependency "ReactCommon/turbomodule/core", version s.dependency "React-jsi", version + s.subspec "animations" do |ss| + ss.dependency folly_dep_name, folly_version + ss.compiler_flags = folly_compiler_flags + ss.source_files = "react/renderer/animations/**/*.{m,mm,cpp,h}" + ss.exclude_files = "react/renderer/animations/tests" + ss.header_dir = "react/renderer/animations" + ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } + end + s.subspec "attributedstring" do |ss| ss.dependency folly_dep_name, folly_version ss.compiler_flags = folly_compiler_flags - ss.source_files = "fabric/attributedstring/**/*.{m,mm,cpp,h}" - ss.exclude_files = "**/tests/*" - ss.header_dir = "react/attributedstring" + ss.source_files = "react/renderer/attributedstring/**/*.{m,mm,cpp,h}" + ss.exclude_files = "react/renderer/attributedstring/tests" + ss.header_dir = "react/renderer/attributedstring" ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } end @@ -57,13 +65,13 @@ Pod::Spec.new do |s| ss.dependency folly_dep_name, folly_version ss.compiler_flags = folly_compiler_flags ss.source_files = "better/**/*.{m,mm,cpp,h}" - ss.exclude_files = "**/tests/*" + ss.exclude_files = "better/tests" ss.header_dir = "better" ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } end s.subspec "config" do |ss| - ss.source_files = "config/*.{m,mm,cpp,h}" + ss.source_files = "react/config/*.{m,mm,cpp,h}" ss.header_dir = "react/config" ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\"" } end @@ -71,121 +79,145 @@ Pod::Spec.new do |s| s.subspec "core" do |ss| ss.dependency folly_dep_name, folly_version ss.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags - ss.source_files = "fabric/core/**/*.{m,mm,cpp,h}" - ss.exclude_files = "**/tests/**/*" - ss.header_dir = "react/core" + ss.source_files = "react/renderer/core/**/*.{m,mm,cpp,h}" + ss.exclude_files = "react/renderer/core/tests" + ss.header_dir = "react/renderer/core" ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } end + s.subspec "componentregistry" do |ss| + ss.dependency folly_dep_name, folly_version + ss.compiler_flags = folly_compiler_flags + ss.source_files = "react/renderer/componentregistry/**/*.{m,mm,cpp,h}" + ss.header_dir = "react/renderer/componentregistry" + ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } + end + s.subspec "components" do |ss| ss.subspec "activityindicator" do |sss| sss.dependency folly_dep_name, folly_version sss.compiler_flags = folly_compiler_flags - sss.source_files = "fabric/components/activityindicator/**/*.{m,mm,cpp,h}" - sss.exclude_files = "**/tests/*" - sss.header_dir = "react/components/activityindicator" + sss.source_files = "react/renderer/components/activityindicator/**/*.{m,mm,cpp,h}" + sss.exclude_files = "react/renderer/components/activityindicator/tests" + sss.header_dir = "react/renderer/components/activityindicator" sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } end ss.subspec "image" do |sss| sss.dependency folly_dep_name, folly_version sss.compiler_flags = folly_compiler_flags - sss.source_files = "fabric/components/image/**/*.{m,mm,cpp,h}" - sss.exclude_files = "**/tests/*" - sss.header_dir = "react/components/image" + sss.source_files = "react/renderer/components/image/**/*.{m,mm,cpp,h}" + sss.exclude_files = "react/renderer/components/image/tests" + sss.header_dir = "react/renderer/components/image" + sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } + end + + ss.subspec "inputaccessory" do |sss| + sss.dependency folly_dep_name, folly_version + sss.compiler_flags = folly_compiler_flags + sss.source_files = "react/renderer/components/inputaccessory/**/*.{m,mm,cpp,h}" + sss.exclude_files = "react/renderer/components/inputaccessory/tests" + sss.header_dir = "react/renderer/components/inputaccessory" sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } end ss.subspec "legacyviewmanagerinterop" do |sss| sss.dependency folly_dep_name, folly_version sss.compiler_flags = folly_compiler_flags - sss.source_files = "fabric/components/legacyviewmanagerinterop/**/*.{m,mm,cpp,h}" - sss.exclude_files = "**/tests/*" - sss.header_dir = "react/components/legacyviewmanagerinterop" + sss.source_files = "react/renderer/components/legacyviewmanagerinterop/**/*.{m,mm,cpp,h}" + sss.exclude_files = "react/renderer/components/legacyviewmanagerinterop/tests" + sss.header_dir = "react/renderer/components/legacyviewmanagerinterop" sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/Headers/Private/React-Core\"" } end ss.subspec "modal" do |sss| sss.dependency folly_dep_name, folly_version sss.compiler_flags = folly_compiler_flags - sss.source_files = "fabric/components/modal/**/*.{m,mm,cpp,h}" - sss.exclude_files = "**/tests/*" - sss.header_dir = "react/components/modal" + sss.source_files = "react/renderer/components/modal/**/*.{m,mm,cpp,h}" + sss.exclude_files = "react/renderer/components/modal/tests" + sss.header_dir = "react/renderer/components/modal" + sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } + end + + ss.subspec "picker" do |sss| + sss.dependency folly_dep_name, folly_version + sss.compiler_flags = folly_compiler_flags + sss.source_files = "react/renderer/components/picker/iospicker/**/*.{m,mm,cpp,h}" + sss.exclude_files = "react/renderer/components/picker/iospicker/tests" + sss.header_dir = "react/renderer/components/iospicker" sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } end ss.subspec "rncore" do |sss| sss.dependency folly_dep_name, folly_version sss.compiler_flags = folly_compiler_flags - sss.source_files = "fabric/components/rncore/*.{m,mm,cpp,h}" - sss.exclude_files = "**/tests/*", "fabric/components/rncore/*Tests.{h,cpp}", - # TODO: These should be re-enabled later when Codegen Native Module support is needed. - "fabric/components/rncore/rncore-generated.mm", "fabric/components/rncore/NativeModules.{h,cpp}" - sss.header_dir = "react/components/rncore" + sss.source_files = "react/renderer/components/rncore/**/*.{m,mm,cpp,h}" + sss.exclude_files = "react/renderer/components/rncore/tests" + sss.header_dir = "react/renderer/components/rncore" sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } end ss.subspec "root" do |sss| sss.dependency folly_dep_name, folly_version sss.compiler_flags = folly_compiler_flags - sss.source_files = "fabric/components/root/**/*.{m,mm,cpp,h}" - sss.exclude_files = "**/tests/*" - sss.header_dir = "react/components/root" + sss.source_files = "react/renderer/components/root/**/*.{m,mm,cpp,h}" + sss.exclude_files = "react/renderer/components/root/tests" + sss.header_dir = "react/renderer/components/root" sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } end ss.subspec "safeareaview" do |sss| sss.dependency folly_dep_name, folly_version sss.compiler_flags = folly_compiler_flags - sss.source_files = "fabric/components/safeareaview/**/*.{m,mm,cpp,h}" - sss.exclude_files = "**/tests/*" - sss.header_dir = "react/components/safeareaview" + sss.source_files = "react/renderer/components/safeareaview/**/*.{m,mm,cpp,h}" + sss.exclude_files = "react/renderer/components/safeareaview/tests" + sss.header_dir = "react/renderer/components/safeareaview" sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } end ss.subspec "scrollview" do |sss| sss.dependency folly_dep_name, folly_version sss.compiler_flags = folly_compiler_flags - sss.source_files = "fabric/components/scrollview/**/*.{m,mm,cpp,h}" - sss.exclude_files = "**/tests/*" - sss.header_dir = "react/components/scrollview" + sss.source_files = "react/renderer/components/scrollview/**/*.{m,mm,cpp,h}" + sss.exclude_files = "react/renderer/components/scrollview/tests" + sss.header_dir = "react/renderer/components/scrollview" sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } end ss.subspec "slider" do |sss| sss.dependency folly_dep_name, folly_version sss.compiler_flags = folly_compiler_flags - sss.source_files = "fabric/components/slider/**/*.{m,mm,cpp,h}" - sss.exclude_files = "**/tests/*", - "**/android/*" - sss.header_dir = "react/components/slider" + sss.source_files = "react/renderer/components/slider/**/*.{m,mm,cpp,h}" + sss.exclude_files = "react/renderer/components/slider/tests/**/*", + "react/renderer/components/slider/platform/android" + sss.header_dir = "react/renderer/components/slider" sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } end ss.subspec "text" do |sss| sss.dependency folly_dep_name, folly_version sss.compiler_flags = folly_compiler_flags - sss.source_files = "fabric/components/text/**/*.{m,mm,cpp,h}" - sss.exclude_files = "**/tests/*" - sss.header_dir = "react/components/text" + sss.source_files = "react/renderer/components/text/**/*.{m,mm,cpp,h}" + sss.exclude_files = "react/renderer/components/text/tests" + sss.header_dir = "react/renderer/components/text" sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } end ss.subspec "textinput" do |sss| sss.dependency folly_dep_name, folly_version sss.compiler_flags = folly_compiler_flags - sss.source_files = "fabric/components/textinput/iostextinput/**/*.{m,mm,cpp,h}" - sss.exclude_files = "**/tests/*" - sss.header_dir = "react/components/iostextinput" + sss.source_files = "react/renderer/components/textinput/iostextinput/**/*.{m,mm,cpp,h}" + sss.exclude_files = "react/renderer/components/textinput/iostextinput/tests" + sss.header_dir = "react/renderer/components/iostextinput" sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } end ss.subspec "unimplementedview" do |sss| sss.dependency folly_dep_name, folly_version sss.compiler_flags = folly_compiler_flags - sss.source_files = "fabric/components/unimplementedview/**/*.{m,mm,cpp,h}" - sss.exclude_files = "**/tests/*" - sss.header_dir = "react/components/unimplementedview" + sss.source_files = "react/renderer/components/unimplementedview/**/*.{m,mm,cpp,h}" + sss.exclude_files = "react/renderer/components/unimplementedview/tests" + sss.header_dir = "react/renderer/components/unimplementedview" sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } end @@ -193,9 +225,9 @@ Pod::Spec.new do |s| sss.dependency folly_dep_name, folly_version sss.dependency "Yoga" sss.compiler_flags = folly_compiler_flags - sss.source_files = "fabric/components/view/**/*.{m,mm,cpp,h}" - sss.exclude_files = "**/tests/*" - sss.header_dir = "react/components/view" + sss.source_files = "react/renderer/components/view/**/*.{m,mm,cpp,h}" + sss.exclude_files = "react/renderer/components/view/tests" + sss.header_dir = "react/renderer/components/view" sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } end end @@ -203,9 +235,9 @@ Pod::Spec.new do |s| s.subspec "debug" do |ss| ss.dependency folly_dep_name, folly_version ss.compiler_flags = folly_compiler_flags - ss.source_files = "fabric/debug/**/*.{m,mm,cpp,h}" - ss.exclude_files = "**/tests/*" - ss.header_dir = "react/debug" + ss.source_files = "react/renderer/debug/**/*.{m,mm,cpp,h}" + ss.exclude_files = "react/renderer/debug/tests" + ss.header_dir = "react/renderer/debug" ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } end @@ -213,45 +245,64 @@ Pod::Spec.new do |s| ss.dependency "React-RCTImage", version ss.dependency folly_dep_name, folly_version ss.compiler_flags = folly_compiler_flags - ss.source_files = "fabric/imagemanager/**/*.{m,mm,cpp,h}" - ss.exclude_files = "**/tests/*", - "**/android/*", - "**/cxx/*" - ss.header_dir = "react/imagemanager" + ss.source_files = "react/renderer/imagemanager/**/*.{m,mm,cpp,h}" + ss.exclude_files = "react/renderer/imagemanager/tests", + "react/renderer/imagemanager/platform/android", + "react/renderer/imagemanager/platform/cxx" + ss.header_dir = "react/renderer/imagemanager" ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } end s.subspec "mounting" do |ss| ss.dependency folly_dep_name, folly_version ss.compiler_flags = folly_compiler_flags - ss.source_files = "fabric/mounting/**/*.{m,mm,cpp,h}" - ss.exclude_files = "**/tests/*" - ss.header_dir = "react/mounting" + ss.source_files = "react/renderer/mounting/**/*.{m,mm,cpp,h}" + ss.exclude_files = "react/renderer/mounting/tests" + ss.header_dir = "react/renderer/mounting" + ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } + end + + s.subspec "scheduler" do |ss| + ss.dependency folly_dep_name, folly_version + ss.compiler_flags = folly_compiler_flags + ss.source_files = "react/renderer/scheduler/**/*.{m,mm,cpp,h}" + ss.header_dir = "react/renderer/scheduler" + ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } + end + + s.subspec "templateprocessor" do |ss| + ss.dependency folly_dep_name, folly_version + ss.compiler_flags = folly_compiler_flags + ss.source_files = "react/renderer/templateprocessor/**/*.{m,mm,cpp,h}" + ss.exclude_files = "react/renderer/templateprocessor/tests" + ss.header_dir = "react/renderer/templateprocessor" ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } end s.subspec "textlayoutmanager" do |ss| ss.dependency folly_dep_name, folly_version + ss.dependency "React-Fabric/uimanager" ss.compiler_flags = folly_compiler_flags - ss.source_files = "fabric/textlayoutmanager/**/*.{m,mm,cpp,h}" - ss.exclude_files = "**/tests/*", - "**/android/*", - "**/cxx/*" - ss.header_dir = "react/textlayoutmanager" + ss.source_files = "react/renderer/textlayoutmanager/platform/ios/**/*.{m,mm,cpp,h}", + "react/renderer/textlayoutmanager/*.{m,mm,cpp,h}" + ss.exclude_files = "react/renderer/textlayoutmanager/tests", + "react/renderer/textlayoutmanager/platform/android", + "react/renderer/textlayoutmanager/platform/cxx" + ss.header_dir = "react/renderer/textlayoutmanager" ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } end s.subspec "uimanager" do |ss| ss.dependency folly_dep_name, folly_version ss.compiler_flags = folly_compiler_flags - ss.source_files = "fabric/uimanager/**/*.{m,mm,cpp,h}" - ss.exclude_files = "**/tests/*", - ss.header_dir = "react/uimanager" + ss.source_files = "react/renderer/uimanager/**/*.{m,mm,cpp,h}" + ss.exclude_files = "react/renderer/uimanager/tests" + ss.header_dir = "react/renderer/uimanager" ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } end s.subspec "utils" do |ss| - ss.source_files = "utils/*.{m,mm,cpp,h}" + ss.source_files = "react/utils/*.{m,mm,cpp,h}" ss.header_dir = "react/utils" ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } end diff --git a/ReactCommon/react/renderer/graphics/React-graphics.podspec b/ReactCommon/react/renderer/graphics/React-graphics.podspec index 30bffb22f09d7b..aebbc2cd293267 100644 --- a/ReactCommon/react/renderer/graphics/React-graphics.podspec +++ b/ReactCommon/react/renderer/graphics/React-graphics.podspec @@ -5,7 +5,7 @@ require "json" -package = JSON.parse(File.read(File.join(__dir__, "..", "..", "..", "package.json"))) +package = JSON.parse(File.read(File.join(__dir__, "..", "..", "..", "..", "package.json"))) version = package['version'] source = { :git => 'https://github.com/facebook/react-native.git' } @@ -32,11 +32,11 @@ Pod::Spec.new do |s| s.library = "stdc++" s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags s.source_files = "**/*.{m,mm,cpp,h}" - s.exclude_files = "**/tests/*", - "**/android/*", - "**/cxx/*" - s.header_dir = "react/graphics" - s.pod_target_xcconfig = { "USE_HEADERMAP" => "NO", "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } + s.exclude_files = "tests", + "platform/android", + "platform/cxx" + s.header_dir = "react/renderer/graphics" + s.pod_target_xcconfig = { "USE_HEADERMAP" => "NO", "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_TARGET_SRCROOT)/../../../\" \"$(PODS_ROOT)/RCT-Folly\"" } - s.dependency "Folly/Fabric", folly_version + s.dependency "RCT-Folly/Fabric", folly_version end diff --git a/ReactCommon/yoga/Yoga.podspec b/ReactCommon/yoga/Yoga.podspec index 500dfee8e47ac5..b723a3410018da 100644 --- a/ReactCommon/yoga/Yoga.podspec +++ b/ReactCommon/yoga/Yoga.podspec @@ -51,7 +51,7 @@ Pod::Spec.new do |spec| source_files = File.join('ReactCommon/yoga', source_files) if ENV['INSTALL_YOGA_WITHOUT_PATH_OPTION'] spec.source_files = source_files - header_files = 'yoga/{Yoga,YGEnums,YGMacros,YGValue}.h' + header_files = 'yoga/{Yoga,YGEnums,YGMacros,YGNode,YGStyle,YGValue}.h' header_files = File.join('ReactCommon/yoga', header_files) if ENV['INSTALL_YOGA_WITHOUT_PATH_OPTION'] spec.public_header_files = header_files end diff --git a/package.json b/package.json index 2c148374a746f5..445fec2931b649 100644 --- a/package.json +++ b/package.json @@ -37,8 +37,8 @@ "README.md", "rn-get-polyfills.js", "scripts/compose-source-maps.js", - "scripts/generate-native-modules-specs.sh", - "scripts/generate-native-modules-specs-cli.js", + "scripts/generate-specs.sh", + "scripts/generate-specs-cli.js", "scripts/ios-configure-glog.sh", "scripts/launchPackager.bat", "scripts/launchPackager.command", diff --git a/packages/react-native-codegen/android/gradlePlugin-build/gradlePlugin/src/main/java/com/facebook/react/codegen/plugin/CodegenPluginExtension.java b/packages/react-native-codegen/android/gradlePlugin-build/gradlePlugin/src/main/java/com/facebook/react/codegen/plugin/CodegenPluginExtension.java index eecb4b88f861f9..4d734a1da7decc 100644 --- a/packages/react-native-codegen/android/gradlePlugin-build/gradlePlugin/src/main/java/com/facebook/react/codegen/plugin/CodegenPluginExtension.java +++ b/packages/react-native-codegen/android/gradlePlugin-build/gradlePlugin/src/main/java/com/facebook/react/codegen/plugin/CodegenPluginExtension.java @@ -34,7 +34,7 @@ public File codegenGenerateSchemaCLI() { } public File codegenGenerateNativeModuleSpecsCLI() { - return new File(this.reactNativeRootDir, "scripts/generate-native-modules-specs-cli.js"); + return new File(this.reactNativeRootDir, "scripts/generate-specs-cli.js"); } private String projectPathToLibraryName(final String projectPath) { diff --git a/packages/rn-tester/Podfile b/packages/rn-tester/Podfile index efc5c339ad5b98..23a2e0ee737b6b 100644 --- a/packages/rn-tester/Podfile +++ b/packages/rn-tester/Podfile @@ -15,18 +15,26 @@ end def pods() project 'RNTesterPods.xcodeproj' - # Enable TurboModule + fabric_enabled = false + + # To use fabric: set the environment variable `USE_FABRIC` to 1, like below + # $ USE_FABRIC=1 bundle exec pod install + # or + # $ export USE_FABRIC=1 + # $ bundle exec pod install + if ENV['USE_FABRIC'] == '1' + puts "Building RNTester with Fabric enabled." + fabric_enabled = true + end + prefix_path = "../.." - use_react_native!(path: prefix_path, hermes_enabled: ENV['USE_HERMES'] == '1') + use_react_native!(path: prefix_path, fabric_enabled: fabric_enabled, hermes_enabled: ENV['USE_HERMES'] == '1') pod 'ReactCommon/turbomodule/samples', :path => "#{prefix_path}/ReactCommon" # Additional Pods which aren't included in the default Podfile pod 'React-RCTPushNotification', :path => "#{prefix_path}/Libraries/PushNotificationIOS" pod 'Yoga', :path => "#{prefix_path}/ReactCommon/yoga", :modular_headers => true # Additional Pods which are classed as unstable - # - # To use fabric: add `fabric_enabled` option to the use_react_native method above, like below - # use_react_native!(path: "..", fabric_enabled: true) end target 'RNTester' do diff --git a/packages/rn-tester/Podfile.lock b/packages/rn-tester/Podfile.lock index 832cbc0dad3105..7aac16eb0448ee 100644 --- a/packages/rn-tester/Podfile.lock +++ b/packages/rn-tester/Podfile.lock @@ -490,7 +490,7 @@ SPEC CHECKSUMS: CocoaLibEvent: 2fab71b8bd46dd33ddb959f7928ec5909f838e3f DoubleConversion: cde416483dac037923206447da6e1454df403714 FBLazyVector: fe973c09b2299b5e8154186ecf1f6554b4f70987 - FBReactNativeSpec: 77f376d6af8c6348f0cc6de9a96c7a288f4e03ab + FBReactNativeSpec: 8e8b4f540947580f2a9ef54a443453c562d439cd Flipper: be611d4b742d8c87fbae2ca5f44603a02539e365 Flipper-DoubleConversion: 38631e41ef4f9b12861c67d17cb5518d06badc41 Flipper-Folly: e4493b013c02d9347d5e0cb4d128680239f6c78a @@ -525,9 +525,9 @@ SPEC CHECKSUMS: React-RCTVibration: a1cce36dd452eb88296d99d80d66f2c5bd50aad4 React-runtimeexecutor: 53867815d0a01e53a2c901cb7f01076216c5c799 ReactCommon: d101410fc55088c91dc24595715c7b26ec760adf - Yoga: 69ef0b2bba5387523f793957a9f80dbd61e89631 + Yoga: e37ade282f73232191786671781d052c84d0faa8 YogaKit: f782866e155069a2cca2517aafea43200b01fd5a -PODFILE CHECKSUM: 3adfe268d800503789170d1862bde422ee204fe8 +PODFILE CHECKSUM: 486f12ff39a0c690fe414d7ffbbdaa371d51590b COCOAPODS: 1.10.0 diff --git a/scripts/generate-rncore.sh b/scripts/generate-rncore.sh deleted file mode 100755 index 5e67d91c812302..00000000000000 --- a/scripts/generate-rncore.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -# Copyright (c) Facebook, Inc. and its affiliates. -# -# This source code is licensed under the MIT license found in the -# LICENSE file in the root directory of this source tree. - -# This script collects the "core" component schemas used by fabric -# then uses react-native-codegen to generate the component headers -# to a location that the podspecs expect. - -# shellcheck disable=SC2038 - -find "$PWD/../Libraries" -name "*NativeComponent.js" -print | xargs yarn flow-node packages/react-native-codegen/src/cli/combine/combine-js-to-schema-cli.js schema-rncore.json -yarn flow-node packages/react-native-codegen/buck_tests/generate-tests.js schema-rncore.json rncore ReactCommon/fabric/components/rncore rncore diff --git a/scripts/generate-native-modules-specs-cli.js b/scripts/generate-specs-cli.js similarity index 97% rename from scripts/generate-native-modules-specs-cli.js rename to scripts/generate-specs-cli.js index 257ecc84126bac..6b77640f019f94 100644 --- a/scripts/generate-native-modules-specs-cli.js +++ b/scripts/generate-specs-cli.js @@ -25,7 +25,7 @@ const path = require('path'); const GENERATORS = { android: ['modulesAndroid'], - ios: ['modulesIOS'], + ios: ['componentsIOS', 'modulesIOS'], }; function generateSpec( diff --git a/scripts/generate-native-modules-specs.sh b/scripts/generate-specs.sh similarity index 65% rename from scripts/generate-native-modules-specs.sh rename to scripts/generate-specs.sh index b9b71b33134743..69de08b3dcc3e3 100755 --- a/scripts/generate-native-modules-specs.sh +++ b/scripts/generate-specs.sh @@ -5,18 +5,18 @@ # LICENSE file in the root directory of this source tree. # This script collects the JavaScript spec definitions for core -# native modules, then uses react-native-codegen to generate -# native code. +# native modules and components, then uses react-native-codegen +# to generate native code. # The script will use the local react-native-codegen package by # default. Optionally, set the CODEGEN_PATH to point to the # desired codegen library (e.g. when using react-native-codegen # from npm). # # Usage: -# ./scripts/generate-native-modules-specs.sh +# ./scripts/generate-specs.sh # -# Example: -# CODEGEN_PATH=.. ./scripts/generate-native-modules-specs.sh +# Examples: +# CODEGEN_PATH=.. ./scripts/generate-specs.sh # shellcheck disable=SC2038 @@ -27,6 +27,7 @@ TEMP_DIR=$(mktemp -d /tmp/react-native-codegen-XXXXXXXX) RN_DIR=$(cd "$THIS_DIR/.." && pwd) CODEGEN_PATH="${CODEGEN_PATH:-$(cd "$RN_DIR/packages/react-native-codegen" && pwd)}" YARN_BINARY="${YARN_BINARY:-$(command -v yarn)}" +USE_FABRIC="${USE_FABRIC:-0}" cleanup () { set +e @@ -38,12 +39,14 @@ describe () { printf "\\n\\n>>>>> %s\\n\\n\\n" "$1" } -run_codegen () { - SRCS_DIR=$1 - LIBRARY_NAME=$2 - OUTPUT_DIR=$3 +main() { + SRCS_DIR=$(cd "$RN_DIR/Libraries" && pwd) + + OUTPUT_DIR="$TEMP_DIR/out" + COMPONENTS_DIR="$RN_DIR/ReactCommon/react/renderer/components/rncore" + MODULES_DIR="$RN_DIR/Libraries/FBReactNativeSpec/FBReactNativeSpec" - SCHEMA_FILE="$TEMP_DIR/schema-$LIBRARY_NAME.json" + SCHEMA_FILE="$TEMP_DIR/schema.json" if [ ! -d "$CODEGEN_PATH/lib" ]; then describe "Building react-native-codegen package" @@ -58,21 +61,13 @@ run_codegen () { describe "Generating native code from schema (iOS)" pushd "$RN_DIR" >/dev/null || exit - "$YARN_BINARY" --silent node scripts/generate-native-modules-specs-cli.js ios "$SCHEMA_FILE" "$OUTPUT_DIR" + USE_FABRIC="$USE_FABRIC" "$YARN_BINARY" --silent node scripts/generate-specs-cli.js ios "$SCHEMA_FILE" "$OUTPUT_DIR" popd >/dev/null || exit -} -# Handle Core Modules -run_codegen_core_modules () { - LIBRARY_NAME="FBReactNativeSpec" - SRCS_DIR=$(cd "$RN_DIR/Libraries" && pwd) - OUTPUT_DIR="$SRCS_DIR/$LIBRARY_NAME/$LIBRARY_NAME" - - run_codegen "$SRCS_DIR" "$LIBRARY_NAME" "$OUTPUT_DIR" -} - -main() { - run_codegen_core_modules + mkdir -p "$COMPONENTS_DIR" "$MODULES_DIR" + mv "$OUTPUT_DIR/FBReactNativeSpec.h" "$OUTPUT_DIR/FBReactNativeSpec-generated.mm" "$MODULES_DIR" + find "$OUTPUT_DIR" -type f | xargs sed -i '' 's/FBReactNativeSpec/rncore/g' + cp -R "$OUTPUT_DIR/." "$COMPONENTS_DIR" } trap cleanup EXIT diff --git a/scripts/react_native_pods.rb b/scripts/react_native_pods.rb index 70c5a240fe7354..7bfd45bd2e6a10 100644 --- a/scripts/react_native_pods.rb +++ b/scripts/react_native_pods.rb @@ -55,7 +55,7 @@ def use_react_native! (options={}) if fabric_enabled pod 'React-Fabric', :path => "#{prefix}/ReactCommon" - pod 'React-graphics', :path => "#{prefix}/ReactCommon/fabric/graphics" + pod 'React-graphics', :path => "#{prefix}/ReactCommon/react/renderer/graphics" pod 'React-jsi/Fabric', :path => "#{prefix}/ReactCommon/jsi" pod 'React-RCTFabric', :path => "#{prefix}/React" pod 'RCT-Folly/Fabric', :podspec => "#{prefix}/third-party-podspecs/RCT-Folly.podspec"