th3rdwave / react-native-safe-area-context

A flexible way to handle safe area insets in JS. Also works on Android and Web!
MIT License
2.08k stars 191 forks source link

fix: fixes for new arch on RN 74 #473

Closed WoLewicki closed 4 months ago

WoLewicki commented 4 months ago

Summary

This PR aligns the code with newest version of yoga in RN 0.74.0-rc.0. Made with huge help from @piaskowyk

Test Plan

jacobp100 commented 4 months ago

Thanks for this! What does this do for older versions? Will they break?

WoLewicki commented 4 months ago

On new arch it will for sure. On paper I think those files are not compiled so it should not.

jacobp100 commented 4 months ago

I think last time we published this as a pre-release, and then waited until it fully drops to publish in full

@janicduplessis

janicduplessis commented 4 months ago

Yes, we can do pre-release, I'm fine breaking back compat for new arch still.

WoLewicki commented 4 months ago

So let's do it please, it will help with testing it in other libs which use SAC 🚀

janicduplessis commented 4 months ago

Looks like this will cause issues even with new arch disabled. The ci build on android fails with old arch and rn 0.73. We will need to find a way to make this backwards compatible. Maybe we can just not compile those classes with some preprocessor macros when on old arch.

WoLewicki commented 4 months ago

Yeah, it seems not right that you are trying to compile shadow nodes on old arch.

WoLewicki commented 4 months ago

Ok it seems that you are building new arch in both flows now: https://github.com/th3rdwave/react-native-safe-area-context/blob/c9b729343e8e2a73b723a76bae6319b97b121cc6/example/android/gradle.properties#L37 😄

WoLewicki commented 4 months ago

Ok old arch builds correctly now and new arch does not build since it is not compatible with RN 0.73, so it looks ready :rocket:

janicduplessis commented 4 months ago

Thanks! Released as 4.10.0-rc.0