-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[expo-dev-launcher] take 2 at SDK 44 plugin compatibility #15570
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lukmccall
approved these changes
Dec 15, 2021
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.
LGTM β
expo-bot
added
bot: passed checks
ExpoBot has nothing to complain about
and removed
bot: suggestions
ExpoBot has some suggestions
labels
Dec 15, 2021
lukmccall
pushed a commit
that referenced
this pull request
Dec 15, 2021
Co-authored-by: Εukasz Kosmaty <lukasz.kosmaty@swmansion.com># Why when testing #15562 on the sdk-44 branch I found there were still a few issues -- (1) some expo-modules stuff would be inadvertently removed from AppDelegate, even though the project would build, and (2) tests were failing. # How (commit 1) added the correct logic for SDK 44's `initializeReactNativeApp` function (these regexes are getting so messy, we can't move to expo module initialization soon enough π ), and added tests with a corresponding SDK 44 AppDelegate.m. (commit 2) fixed wrong string constant that was causing failures for SDK 43 and below (commit 3) fixed tests on the Android side that were logging warnings. @lukmccall is it correct to say that this config plugin cannot handle projects where `createReactActivityDelegate` isn't already overridden in MainActivity? I modified the tests as such, but if that isn't the case, [this warning](https://github.com/expo/expo/blob/4ca5ff72ef3abcc30cb7936eaf9c4b97fed9a5ad/packages/expo-dev-launcher/plugin/src/withDevLauncher.ts#L205-L209) needs to be changed. # Test Plan All tests pass. Manually tested in a blank SDK 44 app; cherry picked these commits onto sdk-44 and then used patch-package to patch entire the expo-dev-launcher package to match sdk-44 HEAD. Ran expo prebuild, saw no errors, eyeballed the code changes, and tested the following scenarios: β project builds on iOS and Android β iOS: can open app served by `expo start --dev-client` β iOS: can open app served by `expo start --dev-client --force-manifest-type=expo-updates` β Android: can open app served by `expo start --dev-client` β Android: can open app served by `expo start --dev-client --force-manifest-type=expo-updates` β expo install expo-updates@0.11.2, expo prebuild --clean, project builds β iOS (with expo-updates integration): can open app served by `expo start --dev-client` β iOS (with expo-updates integration): can open app served by `expo start --dev-client --force-manifest-type=expo-updates` β iOS (with expo-updates integration): can open published app β Android (with expo-updates integration): can open app served by `expo start --dev-client` β Android (with expo-updates integration): can open app served by `expo start --dev-client --force-manifest-type=expo-updates` β Android (with expo-updates integration): can open published app
DominickVale
pushed a commit
to DominickVale/expo
that referenced
this pull request
Dec 15, 2021
Co-authored-by: Εukasz Kosmaty <lukasz.kosmaty@swmansion.com># Why when testing expo#15562 on the sdk-44 branch I found there were still a few issues -- (1) some expo-modules stuff would be inadvertently removed from AppDelegate, even though the project would build, and (2) tests were failing. # How (commit 1) added the correct logic for SDK 44's `initializeReactNativeApp` function (these regexes are getting so messy, we can't move to expo module initialization soon enough π ), and added tests with a corresponding SDK 44 AppDelegate.m. (commit 2) fixed wrong string constant that was causing failures for SDK 43 and below (commit 3) fixed tests on the Android side that were logging warnings. @lukmccall is it correct to say that this config plugin cannot handle projects where `createReactActivityDelegate` isn't already overridden in MainActivity? I modified the tests as such, but if that isn't the case, [this warning](https://github.com/expo/expo/blob/4ca5ff72ef3abcc30cb7936eaf9c4b97fed9a5ad/packages/expo-dev-launcher/plugin/src/withDevLauncher.ts#L205-L209) needs to be changed. # Test Plan All tests pass. Manually tested in a blank SDK 44 app; cherry picked these commits onto sdk-44 and then used patch-package to patch entire the expo-dev-launcher package to match sdk-44 HEAD. Ran expo prebuild, saw no errors, eyeballed the code changes, and tested the following scenarios: β project builds on iOS and Android β iOS: can open app served by `expo start --dev-client` β iOS: can open app served by `expo start --dev-client --force-manifest-type=expo-updates` β Android: can open app served by `expo start --dev-client` β Android: can open app served by `expo start --dev-client --force-manifest-type=expo-updates` β expo install expo-updates@0.11.2, expo prebuild --clean, project builds β iOS (with expo-updates integration): can open app served by `expo start --dev-client` β iOS (with expo-updates integration): can open app served by `expo start --dev-client --force-manifest-type=expo-updates` β iOS (with expo-updates integration): can open published app β Android (with expo-updates integration): can open app served by `expo start --dev-client` β Android (with expo-updates integration): can open app served by `expo start --dev-client --force-manifest-type=expo-updates` β Android (with expo-updates integration): can open published app
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why
when testing #15562 on the sdk-44 branch I found there were still a few issues -- (1) some expo-modules stuff would be inadvertently removed from AppDelegate, even though the project would build, and (2) tests were failing.
How
(commit 1) added the correct logic for SDK 44's
initializeReactNativeApp
function (these regexes are getting so messy, we can't move to expo module initialization soon enough π ), and added tests with a corresponding SDK 44 AppDelegate.m.(commit 2) fixed wrong string constant that was causing failures for SDK 43 and below
(commit 3) fixed tests on the Android side that were logging warnings. @lukmccall is it correct to say that this config plugin cannot handle projects where
createReactActivityDelegate
isn't already overridden in MainActivity? I modified the tests as such, but if that isn't the case, this warning needs to be changed.Test Plan
All tests pass. Manually tested in a blank SDK 44 app; cherry picked these commits onto sdk-44 and then used patch-package to patch entire the expo-dev-launcher package to match sdk-44 HEAD. Ran expo prebuild, saw no errors, eyeballed the code changes, and tested the following scenarios:
β project builds on iOS and Android
β iOS: can open app served by
expo start --dev-client
β iOS: can open app served by
expo start --dev-client --force-manifest-type=expo-updates
β Android: can open app served by
expo start --dev-client
β Android: can open app served by
expo start --dev-client --force-manifest-type=expo-updates
β expo install expo-updates@0.11.2, expo prebuild --clean, project builds
β iOS (with expo-updates integration): can open app served by
expo start --dev-client
β iOS (with expo-updates integration): can open app served by
expo start --dev-client --force-manifest-type=expo-updates
β iOS (with expo-updates integration): can open published app
β Android (with expo-updates integration): can open app served by
expo start --dev-client
β Android (with expo-updates integration): can open app served by
expo start --dev-client --force-manifest-type=expo-updates
β Android (with expo-updates integration): can open published app
Checklist
expo build
(eg: updated@expo/xdl
).expo prebuild
& EAS Build (eg: updated a module plugin).