software-mansion / react-native-reanimated

React Native's Animated library reimplemented
https://docs.swmansion.com/react-native-reanimated/
MIT License
8.84k stars 1.29k forks source link

error compiling on react-native-macos #6469

Closed arolson101 closed 17 hours ago

arolson101 commented 2 weeks ago

Description

error while building the macos project (react-native run-macos) xcode Version 15.4 (15F31d)

/Users/andrew/GitHub/rntodo/node_modules/react-native-reanimated/apple/REANodesManager.mm:576:18: error: cannot initialize a parameter of type 'RCTViewManagerUIBlock' (aka 'void (^)(RCTUIManager *__strong, NSDictionary<NSNumber *,NSView *> *__strong)') with an rvalue of type 'void (^)(RCTUIManager *__strong, NSDictionary<NSNumber *,REAUIView *> *__strong)'
      addUIBlock:^(__unused RCTUIManager *manager, __unused NSDictionary<NSNumber *, REAUIView *> *viewRegistry) {
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /Users/andrew/GitHub/rntodo/node_modules/react-native-reanimated/apple/REANodesManager.mm:2:
In file included from /Users/andrew/GitHub/rntodo/node_modules/react-native-reanimated/apple/REAModule.h:13:
/Users/andrew/GitHub/rntodo/macos/Pods/Headers/Public/React-Core/React/RCTUIManager.h:102:43: note: passing argument to parameter 'block' here
- (void)addUIBlock:(RCTViewManagerUIBlock)block;
                                          ^
13 warnings and 1 error generated.

Steps to reproduce

  1. create a react-native project
  2. install react-native-reanimated
  3. npx react-native-macos-init
  4. comment out :flipper_configuration => FlipperConfiguration.disabled, in macos/Podfile
  5. run react-native run-macos
  6. it will fail to compile due to this error

Snack or a link to a repository

https://github.com/arolson101/rntodo

Reanimated version

3.15.1

React Native version

0.75.2

Platforms

macOS

JavaScript runtime

Hermes

Workflow

None

Architecture

Paper (Old Architecture)

Build type

Debug app & dev bundle

Device

Real device

Device model

macbook pro 2.3 GHz Quad-Core Intel Core i5

Acknowledgements

Yes

hsjoberg commented 2 weeks ago

Dupe of #6421. Just changing everywhere it complains from REAUIView to NSView fixes it.

I'll investigate some more what's wrong

piaskowyk commented 17 hours ago

I can confirm that this is a duplication of https://github.com/software-mansion/react-native-reanimated/issues/6421 so I'll close an issue to keep discussion in a single place 🫡