-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Added way to not launch packager during CI build, as it hangs CI builds #6180
Conversation
…makes Xcode not the launch the packager when building. This switch is needed for CI builds, where launching the packager, which stays running, causes the build to hang; port conflicts can be an issue as well. Really the packager is only appropriate for interactive developer builds. This is a problem for Visual Studio Team Services where we just added React Native CI build support with a React Native build extension and surely a problem for all CI systems. This fix is simple, and now if the build machine sets RCT_NO_LAUNCH_PACKAGER globally or passes it as an arg to xcodebuild, the packager won't launch and all is well.
By analyzing the blame information on this pull request, we identified @mroswald, @sahrens and @nicklockwood to be potential reviewers. |
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at [email protected]. Thanks! |
@BretJohnson updated the pull request. |
@BretJohnson updated the pull request. |
@facebook-github-bot shipit |
As for the CLA Signed label: I did sign the CLA earlier, late last year. But my GitHub user name (not email) changed after the acceptance, which apparently caused issues with the Facebook CLA acceptance registry, which needed to be fixed manually. Christine Abernathy at Facebook fixed that up today. I'm not sure what's needed to get the CLA Signed label to show up on this PR--hopefully something will trigger it--but I did sign the CLA. |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
Good--my comment triggered the CLA Signed label being added. Hopefully you guys can merge this soon. Thx. |
Closing / reopening PR, to retrigger Travis build. |
Reopening PR, to retrigger Travis build. |
Can this be merged? |
@sahrens would you mind taking a look at this pull request? It's been a while since the last commit was reviewed. |
Can someone please rebase this branch so it could be merged? |
@BretJohnson any chance you can rebase your changes? |
@BretJohnson updated the pull request. |
@jeanregisser I just hit the "Update branch" button. Will that do it? |
@BretJohnson looks like it's good. |
@facebook-github-bot shipit |
@nicklockwood would you mind taking a look at this pull request? It's been a while since the last commit was reviewed. |
Is there anything needs to be done to get this merged in? |
I am still waiting for this PR. Is there anything we can do to make this PR merged? |
Sorry for the delay on this. @facebook-github-bot shipit |
Thanks for importing.If you are an FB employee go to Phabricator to review internal test results. |
8fd2d7d
@sahrens Thanks!! |
Summary: Currently, while running `react-native run-android` command, React Native's packager is launched, and there is not any way to disable the current behaviour. This is handled somehow on iOS by adding an environment variable `RCT_NO_LAUNCH_PACKAGER` (see #6180). This is a cross-platform solution that adds the `--no-packager` option both to `run-ios` and `run-android`, which prevents the packager from being launched. This was tested by building with and without the option, on both environments (Android and iOS) using the device and simulator, working as expected. Closes #11735 Differential Revision: D4392170 Pulled By: ericvicenti fbshipit-source-id: 1c31f109f18715b84cd5ab1b6d5fd758cd0a6efb
Change & motivation:
Added an environment variable, RCT_NO_LAUNCH_PACKAGER, that when set
Xcode not the launch the packager when building. This switch is needed
for CI builds, where launching the packager, which stays running, causes
the build to hang; port conflicts can be an issue as well. Really the
packager is only appropriate for interactive developer builds. This
is a problem for Visual Studio Team Services where we just added
React Native CI build support with a React Native build extension and
surely a problem for all CI systems. This fix is simple, and now if
the build machine sets RCT_NO_LAUNCH_PACKAGER globally or passes
it as an arg to xcodebuild, the packager won't launch and all is well.
Testing:
I tested by building both with & without the environment variable defined, ensuring
things work probably in both cases. I also added support to our VSTS build ask to use
this and verified it works as expected too, when setting the variable..