- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 550
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support for RN 0.78.0-rc.5 #2626
Conversation
heyo - nice work! are you planning on releasing a beta for RN 78-rc support? Specifically the |
Hey, I expect support for 0.78 to be released first in beta of 4.8.0 (a month from now?). We still have only-latest-version-support policy for Fabric and I do not want to switch for 0.78 too early. |
ok, understood. thx I'm asking because that's the only thing blocking Nitro Views 😅 |
## Summary Adds if checks for the RN 0.78 in native code, thanks to which package builds on both - 0.78 nd 0.77. ## Checklist - [ ] Upgrade `react-native-screens` when 0.78 support is added (software-mansion/react-native-screens#2626) - [ ] Upgrade `react-native-svg` when 0.78 support is added (software-mansion/react-native-svg#2619) - [ ] Upgrade `react-native-gesture-handler` when 0.78 support is added (software-mansion/react-native-gesture-handler#3354) - [ ] `react-native-pager-view` auto generated schema contains invalid `StringEnumTypeAnnotation` fields and crashes build on Android || Fabric (iOS) | Fabric (Android) | Web | MacOS (not upgraded) | TVOS (not upgraded) | |-|-|-|-|-|-| | Builds | ✅ | ✅ | ✅ | ✅ | ✅ | | Runs | ❌ | ❌ | ❌ | ✅ | ✅ | *Apps where RN was upgraded don't run because of incompatible dependency versions
Hey - sorry hate to be annoying, but did you release a beta for this yet? |
Nope, I'm releasing stable 4.7.0 today evening & 78 support is next thing in the queue. |
## Description @kkafar: Fixes #2594 ## Changes <!-- Please describe things you've changed here, make a **high level** overview, if change is simple you can omit this section. For example: - Updated `about.md` docs --> <!-- ## Screenshots / GIFs Here you can add screenshots / GIFs documenting your change. You can add before / after section if you're changing some behavior. ### Before ### After --> ## Test code and steps to reproduce <!-- Please include code that can be used to test this change and short description how this example should work. This snippet should be as minimal as possible and ready to be pasted into editor (don't exclude exports or remove "not important" parts of reproduction example) --> ## Checklist - [ ] Included code example that can be used to test this change - [ ] Updated TS types - [ ] Updated documentation: <!-- For adding new props to native-stack --> - [ ] https://github.com/software-mansion/react-native-screens/blob/main/guides/GUIDE_FOR_LIBRARY_AUTHORS.md - [ ] https://github.com/software-mansion/react-native-screens/blob/main/native-stack/README.md - [ ] https://github.com/software-mansion/react-native-screens/blob/main/src/types.tsx - [ ] https://github.com/software-mansion/react-native-screens/blob/main/src/native-stack/types.tsx - [ ] Ensured that CI passes
The `NativeViewHierarchyManager` argument in `.addUIBlock` is nullable. (See [`UIBlock::execute(...)`](https://github.com/facebook/react-native/blob/864c34e9f6c55319417633206e58cefc3c962e7d/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIBlock.kt#L12)) This PR fixes that definition and makes it nullable, and also checks for null. In our case, we likely want to exit out of that and just do nothing. (but lmk, I can also change to a throw) <!-- Description and motivation for this PR. Include Fixes #<number> if this is fixing some issue. Fixes # . --> - Fixed `NativeViewHierarchyManager` being nullable <!-- Please describe things you've changed here, make a **high level** overview, if change is simple you can omit this section. For example: - Updated `about.md` docs --> <!-- Here you can add screenshots / GIFs documenting your change. You can add before / after section if you're changing some behavior. --> <!-- Please include code that can be used to test this change and short description how this example should work. This snippet should be as minimal as possible and ready to be pasted into editor (don't exclude exports or remove "not important" parts of reproduction example) --> - [ ] Included code example that can be used to test this change - [ ] Updated TS types - [ ] Updated documentation: <!-- For adding new props to native-stack --> - [ ] https://github.com/software-mansion/react-native-screens/blob/main/guides/GUIDE_FOR_LIBRARY_AUTHORS.md - [ ] https://github.com/software-mansion/react-native-screens/blob/main/native-stack/README.md - [ ] https://github.com/software-mansion/react-native-screens/blob/main/src/types.tsx - [ ] https://github.com/software-mansion/react-native-screens/blob/main/src/native-stack/types.tsx - [x] Ensured that CI passes --------- Co-authored-by: Kacper Kafara <kacper.kafara@swmansion.com>
12adf96
to
97a3952
Compare
… type of distribution
Currently blocked by issue similar to: This happens on both platforms. |
It seems that there is no issue when running fresh application. Most likely the error happens due to some invalid (but not invalidated) caches. |
But the issue does happen on clean installation of the |
Tests are failing because I've installed reanimated 4 for the sake of build & it does support only new architecture. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests are failing because I've installed reanimated 4 for the sake of build & it does support only new architecture.
This is something to fixup later, because the 78 stable is out & this PR is good enough for beta.
## Description Adding support for `react-native@0.78.0`. ## Changes - adjusted example apps (Android, iOS) on both architectures (Paper, Fabric) with changes from upgrade helper, - added additional fixes (android, ios, cpp) from 4.x (#2626), - updated dependencies, gradle of the library: - uncommented `syncArchs` task, because updating `react-native` version of the library fixed the problem with codegen, - fixed issue connected with Gesture Handler: - #2618, - updated TVOS example app (from 0.74.1) to match example app from 4.x and Android, iOS apps, - fixed a bug with `replaceNavigationBarViewsWithSnapshotOfSubview` method by adding a nil check: - adapted from #2485, - restoring backward compatibility: - #2730, - #2737. ## Test code and steps to reproduce CI ## Checklist - [ ] Ensured that CI passes --------- Co-authored-by: Kacper Kafara <kacper.kafara@swmansion.com>
Description
Add library support for react-native 0.78 & use 0.78 in example apps.
Caution
This PR breaks compatibility with older react native versions on new architecture. In case it is merged new architecture will be supported only from 0.78 onwards. The breaking change in core we need to follow:
There are also breaking changes made in core regarding method / function signatures, see required adjustments here 5a7e440
I believe these Android method signature changes do break backward compatibility also on old architecture!
Changes
Test code and steps to reproduce
Checklist