-
Notifications
You must be signed in to change notification settings - Fork 24.6k
HMR support multi clients #11876
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
HMR support multi clients #11876
Conversation
By analyzing the blame information on this pull request, we identified @cpojer and @yungsters to be potential reviewers. |
@jeanlauliac can you take this one? |
Waiting on review from @jeanlauliac |
Found a mistake, need fix, clients should be group by platform and bundleEntry. The problem is if clients are both iOS or both Android, it's fine, but not correct for iOS and Android. |
Fix a case
Steps:
Expect:
Bug in previous commit:
That's fixed. The last commit group clients by |
Can someone help me to test? @jeanlauliac Can you review now? |
…Also support more platform and more bundle entries.
a69b159
to
633b60a
Compare
Found a problem but not this PR's: On Android, If you enable HMR and then disable it, the WebSocket connection doesn't disconnect, must close it to let it be disconnected. Not a big problem, but need to know if you test. |
Yes, I'll try moving forward with this in the next few days. I'm not familiar with the existing HMR module so I'll have to comprehend that first. Thank you for the updates! |
@jeanlauliac has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
I tried to merge this pull request into the Facebook internal repo but some checks failed. To unblock yourself please check the following: Does this pull request pass all open source tests on GitHub? If not please fix those. Does the code still apply cleanly on top of GitHub master? If not can please rebase. In all other cases this means some internal test failed, for example a part of a fb app won't work with this pull request. I've added the Import Failed label to this pull request so it is easy for someone at fb to find the pull request and check what failed. If you don't see anyone comment in a few days feel free to comment mentioning one of the core contributors to the project so they get a notification. |
Should I do something to fix? |
Hey @cpunion, please ignore the message from the bot above. This is because the pull request was imported to Phabricator but not accepted yet and the bot doesn't take that into account :/ You'll just need to wait for @jeanlauliac to review it. |
Hi there, I just wanted to apply the patch locally and do a few tests. No action is required :) I'll seek to land this before the end of this week. |
Hi there! I've been dragging feet on that PR—that I'm sad about—because I have low confidence that it's not going to break so edge cases; especially on a part of the code I'm not too familiar with. I realised that this file could use some automated testing, that is what you give me this missing confidence. I'll look into adding at least a unit test that verifies the basic behaviour, and I'll look into adding an integration test for testing HMR packager-wide. (On the bright side, we already have an e2e test covering HMR in CircleCI, but it might be flaky and covers only a tiny range of HMR behaviour.) After doing so I'll be a lot more confident into merging this changeset. I'd be grateful for automated testing contributions if this is of interest to you, otherwise I myself wish to look into it next week or so. |
I'll try to add e2e tests. |
I'd like to strengthen the integration testing coverage before merging these kind of changes, something we're slowing improving. We also want to extract the packager on a separate repo eventually so that it's easier to contribute and review. I'm closing this PR for the time being, but I'd love to reopen once we get good integration testing. |
@jeanlauliac Any update on the feasibility of merging a change like this? Multiple HMR clients would be great. |
Explain the motivation for making this change. What existing problem does the pull request solve?
Prefer small pull requests. These are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.
Test plan (required)