-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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
Add setup-nightly script for 3rd party libs to test nightly builds #34838
Conversation
Base commit: 4363626 |
Can you elaborate on what are the 3rd party lib assumptions you refer to here?
|
Base commit: 403fea2 |
for instance,
if you need more examples, please let me know. i'll try to find more for you. thanks! |
It seems that both Expo and Reanimated rely on the IMHO this should not be fixed by a version change inside React Native but by a version parsing change on your end. You can easily do something like:
You can then pass over this information to your Gradle/CMake config and use it accordingly. Or you can override your I would refrain from:
EDIT: Typo |
this is fair enough to me. however, it needs third party libraries to update their build settings. i will start this change from expo and share how to integrate nightly testing to the community. |
I understand. Still third party libraries should not need to know the RN minor version. I can understand that Expo and Reanimated are edge case in this sense and might need specific APIs. Still, I'm happy to discuss how we can expose APIs from the framework in a more structured way instead of relying on string comparisons on the version number 👍 |
thanks for the kindness. i would say the version detection so far is the reliable way. there are various types of breaking changes, i don't think we have to pay effort on exposing stable API in the meantime.
let's just keep it as-is. |
the pr is at #34846 |
# Why follow up with facebook/react-native#34838 (comment) to support nightly build # How override react-native version as `9999.9999.9999` when it's `0.0.0-` prefixed # Test Plan 1. adding a react-native nightly version and remove all 3rd party libraries from bare-expo 2. do some manual changes - _packages/expo/android/src/main/java/expo/modules/ReactNativeHostWrapperBase.kt_ to remove deprecated `getUIImplementationProvider` 3. test ios / android build
Summary
Most third-party libraries used to deal with react-native breaking changes by checking the package version, e.g. expo or reanimated. However, the nightly build version on npm is something like
0.0.0-20221001-2020-436362670
. If we check the version, that would be the oldest version.I've tried to visit some proper solutions. If we try to publish nightly versions as
0.999.0
or even1000.999.0
. That would be strange because there're newer published versions on npm than release versions. Maybe the current state to keep the 0.0.0 as nightly builds would still be a good idea. As a workaround, this PR tries to add thesetup-nightly.js
postinstall script. It will rewrite the version after installing the package:999.999.999
999.999.999
Changelog
[General] [Fixed] - Fix nightly builds break version detection for third-party libraries
Test Plan
Test install local pakcage
cd /path/to/react-native ; npm pack --pack-destination $HOME
cd /path/to/app ; yarn add file:$HOME/react-native-1000.0.0.tgz
check whether the versions in pacakge.json and gradle.properties are 999.999.999
Publish nightly build
I didn't test the publishing workflow. Maybe we should check whether CI results.