axelra-ag / react-native-animateable-text

🆎 A fork of React Native's <Text/> component that supports Animated Values!
https://www.npmjs.com/package/react-native-animateable-text
MIT License
360 stars 27 forks source link

v0.11.1 incompatible with React Native 0.72.7 #45

Open leethree opened 5 months ago

leethree commented 5 months ago

Error log here:

▸ Compiling JBTextShadowView.m
❌  /Users/[REDACTED]/git/node_modules/react-native-animateable-text/ios/JBTextShadowView.m:31:41: incompatible function pointer types passing 'YGSize (YGNodeConstRef, float, YGMeasureMode, float, YGMeasureMode)' (aka 'struct YGSize (const struct YGNode *, float, enum YGMeasureMode, float, enum YGMeasureMode)') to parameter of type 'YGMeasureFunc' (aka 'struct YGSize (*)(struct YGNode *, float, enum YGMeasureMode, float, enum YGMeasureMode)') [-Wincompatible-function-pointer-types]
    YGNodeSetMeasureFunc(self.yogaNode, RCTTextShadowViewMeasure);
                 ^
❌  /Users/[REDACTED]/git/node_modules/react-native-animateable-text/ios/JBTextShadowView.m:32:42: incompatible function pointer types passing 'float (YGNodeConstRef, const float, const float)' (aka 'float (const struct YGNode *, const float, const float)') to parameter of type 'YGBaselineFunc' (aka 'float (*)(struct YGNode *, float, float)') [-Wincompatible-function-pointer-types]
    YGNodeSetBaselineFunc(self.yogaNode, RCTTextShadowViewBaseline);
                                                                   ^
⚠️  /Users/[REDACTED]/git/node_modules/react-native-animateable-text/ios/JBTextShadowView.m:395:84: passing 'YGNodeConstRef' (aka 'const struct YGNode *') to parameter of type 'YGNodeRef' (aka 'struct YGNode *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
  JBTextShadowView *shadowTextView = (__bridge JBTextShadowView *)YGNodeGetContext(node);
                                                          ^
⚠️  /Users/[REDACTED]/git/node_modules/react-native-animateable-text/ios/JBTextShadowView.m:427:84: passing 'YGNodeConstRef' (aka 'const struct YGNode *') to parameter of type 'YGNodeRef' (aka 'struct YGNode *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
  JBTextShadowView *shadowTextView = (__bridge JBTextShadowView *)YGNodeGetContext(node);
                                            ^

This is caused by #44.

This should be a breaking change and be added to README.

quizzyDev commented 1 week ago

I'm on "react-native": "0.72.10" and react-native-animateable-text works with version 0.11.0 but not 0.11.1.