Shopify / react-native-skia

High-performance React Native Graphics using Skia
https://shopify.github.io/react-native-skia
MIT License
6.92k stars 447 forks source link

React Native 0.75 compatibility #2576

Closed oblador closed 2 months ago

oblador commented 2 months ago

Description

When using the latest version of React Native (0.75, released yesterday), compiling with this library for Android fails with:

node_modules/@shopify/react-native-skia/android/src/reactnative74/java/com/shopify/reactnative/skia/ReactNativeCompatible.java:12: error: cannot find symbol
        return context.getRuntimeExecutor();
                      ^
  symbol:   method getRuntimeExecutor()
  location: variable context of type ReactContext

If one fixes this Java error, 4 other C++ errors appear such as:

error: static_cast from '__compressed_pair<allocator<BridgelessJSCallInvoker>, BridgelessJSCallInvoker> *' to '_Base1 *' (aka '__compressed_pair_elem<std::allocator<(anonymous namespace)::BridgelessJSCallInvoker>, 0> *'), which are not related by inheritance, is not allowed

Didn't dig that deeply into it, but seems to be related to recent bridgeless changes, even though this happens in "bridgefull" mode as well.

Version

1.3.10

Steps to reproduce

  1. Create a new project with RN 0.75
  2. Add RN Skia dependency
  3. Build Android

Snack, code example, screenshot, or link to a repository

N/A

DanilKasianenko commented 2 months ago

+

sakarzac000 commented 2 months ago

+1

l2hyunwoo commented 2 months ago

+1

graphtobinary commented 2 months ago

+1

codeAbinash commented 2 months ago

+1

longphung commented 2 months ago

+1

mbpictures commented 2 months ago

As a workaround, I managed to fix the issue by adding this patch:

@shopify+react-native-skia+1.3.10.patch

into the patches folder and apply it by using patch-package

sakarzac000 commented 2 months ago

As a workaround, I managed to fix the issue by adding this patch:

@shopify+react-native-skia+1.3.10.patch

into the patches folder and apply it by using patch-package

Great patch, works for me. What functionality is being lost in this workaround, is it defaulting something back to bridgefull while we wait for a fix?

SayeedAfridi commented 2 months ago

+1

oblador commented 2 months ago

Peeps, please refrain from spamming with +1. Instead upvote the original post to show it's affecting you too, or click Subscribe to get notified by updates.

uciadonis commented 2 months ago

+1

wcandillon commented 2 months ago

Haha all good @oblador πŸ˜ŠπŸ™ This is my first +1 spam thread so I'm definitely here for it ❀️

Looking into the Android build now πŸ˜‡

wcandillon commented 2 months ago

@sakarzac000 you patch is correct πŸ‘ I just need to add a flag for version below 0.75

github-actions[bot] commented 2 months ago

:tada: This issue has been resolved in version 1.3.11 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

sakarzac000 commented 2 months ago

@sakarzac000 you patch is correct πŸ‘ I just need to add a flag for version below 0.75

This was all @mbpictures work!

wcandillon commented 2 months ago

oups πŸ˜… gg @mbpictures