Description
Version 2.17.0 of this library encounters C++ dialect-related build errors on React Native 0.72.0-rc.5:
❌ /Users/jeff/Projects/groove/deps/react-native-app/RNReanimated2/ios/Pods/Headers/Public/React-cxxreact/cxxreact/NativeModule.h:28:26: no template named 'optional' in namespace 'std'; did you mean 'folly::Optional'?
using MethodCallResult = std::optional<folly::dynamic>;
^
❌ /Users/jeff/Projects/groove/deps/react-native-app/RNReanimated2/ios/Pods/Headers/Public/React-cxxreact/cxxreact/ModuleRegistry.h:50:3: no template named 'optional' in namespace 'std'; did you mean 'folly::Optional'?
std::optional<ModuleConfig> getConfig(const std::string &name);
^
❌ /Users/jeff/Projects/groove/deps/react-native-app/RNReanimated2/ios/Pods/Headers/Public/React-jsiexecutor/jsireact/JSINativeModules.h:30:3: no template named 'optional' in namespace 'std'; did you mean 'folly::Optional'?
std::optional<jsi::Function> m_genNativeModuleJS;
^
❌ /Users/jeff/Projects/groove/deps/react-native-app/RNReanimated2/ios/Pods/Headers/Public/React-jsiexecutor/jsireact/JSINativeModules.h:34:3: no template named 'optional' in namespace 'std'; did you mean 'folly::Optional'?
std::optional<jsi::Object> createModule(
^
❌ /Users/jeff/Projects/groove/deps/react-native-app/RNReanimated2/ios/Pods/Headers/Public/React-jsiexecutor/jsireact/JSIExecutor.h:131:3: no template named 'optional' in namespace 'std'; did you mean 'folly::Optional'?
std::optional<jsi::Function> callFunctionReturnFlushedQueue_;
^
❌ /Users/jeff/Projects/groove/deps/react-native-app/RNReanimated2/ios/Pods/Headers/Public/React-jsiexecutor/jsireact/JSIExecutor.h:132:3: no template named 'optional' in namespace 'std'; did you mean 'folly::Optional'?
std::optional<jsi::Function> invokeCallbackAndReturnFlushedQueue_;
^
❌ /Users/jeff/Projects/groove/deps/react-native-app/RNReanimated2/ios/Pods/Headers/Public/React-jsiexecutor/jsireact/JSIExecutor.h:133:3: no template named 'optional' in namespace 'std'; did you mean 'folly::Optional'?
std::optional<jsi::Function> flushedQueue_;
^
Changing the C++ dialect setting to match the new React Native c++17 default seems to resolve this issue. We, like others, are stuck on Reanimated 2.x due to react-native-vision-camera.
Steps to reproduce
- Create a bare React Native project on 0.72.0-rc.5
- Ensure that it build successfully on iOS
- Install Reanimated 2.17.0
- Attempt to build on iOS again
Snack or a link to a repository
https://github.com/jbrowning/RN072Reanimated2
Reanimated version
2.17.0
React Native version
0.72.0-rc.5
Platforms
iOS
JavaScript runtime
None
Workflow
React Native (without Expo)
Architecture
Paper (Old Architecture)
Build type
None
Device
None
Device model
No response
Acknowledgements
Yes
Description
Version 2.17.0 of this library encounters C++ dialect-related build errors on React Native 0.72.0-rc.5:
Changing the C++ dialect setting to match the new React Native
c++17default seems to resolve this issue. We, like others, are stuck on Reanimated 2.x due toreact-native-vision-camera.Steps to reproduce
Snack or a link to a repository
https://github.com/jbrowning/RN072Reanimated2
Reanimated version
2.17.0
React Native version
0.72.0-rc.5
Platforms
iOS
JavaScript runtime
None
Workflow
React Native (without Expo)
Architecture
Paper (Old Architecture)
Build type
None
Device
None
Device model
No response
Acknowledgements
Yes