Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove version check in FabricUtils.cpp #3985

Merged
merged 2 commits into from
Jan 20, 2023
Merged
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
5 changes: 0 additions & 5 deletions Common/cpp/Fabric/FabricUtils.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
#ifdef RCT_NEW_ARCH_ENABLED

#if REACT_NATIVE_MINOR_VERSION < 69
#error \
"Reanimated 3 does not support React Native 0.68.x when Fabric is enabled. Please upgrade to React Native 0.69.0 or newer if you want to use Reanimated with the new architecture."
#endif

#include "FabricUtils.h"

#include <react/renderer/debug/SystraceSection.h>
Expand Down
1 change: 1 addition & 0 deletions RNReanimated.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ reanimated_package_json = JSON.parse(File.read(File.join(__dir__, "package.json"
config = find_config()
assert_no_multiple_instances(config)
assert_no_reanimated2_with_new_architecture(reanimated_package_json)
assert_latest_react_native_with_new_architecture(config, reanimated_package_json)

fabric_enabled = ENV['RCT_NEW_ARCH_ENABLED'] == '1'
folly_prefix = config[:react_native_minor_version] >= 64 ? 'RCT-' : ''
Expand Down
10 changes: 10 additions & 0 deletions scripts/reanimated_utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,13 @@ def assert_no_reanimated2_with_new_architecture(reanimated_package_json)
raise "[react-native-reanimated] Reanimated 2.x does not support Fabric. Please upgrade to 3.x to use Reanimated with the New Architecture. For details, see https://blog.swmansion.com/announcing-reanimated-3-16167428c5f7"
end
end

def assert_latest_react_native_with_new_architecture(config, reanimated_package_json)
reanimated_version = reanimated_package_json['version']
reanimated_major_version = reanimated_version.split('.')[0].to_i
react_native_minor_version = config[:react_native_minor_version]
fabric_enabled = ENV['RCT_NEW_ARCH_ENABLED'] == '1'
if fabric_enabled && reanimated_major_version == 3 && react_native_minor_version < 71
raise "[react-native-reanimated] Reanimated " + reanimated_version + " supports the New Architecture only on the latest minor release of React Native. Please upgrade to React Native 0.71.0+ or downgrade to an older version of Reanimated v3"
end
end