Skip to content
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

fix: live reload by resolving watchers only if they weren't notified #716

Merged
merged 2 commits into from
Apr 8, 2020

Conversation

zamotany
Copy link
Contributor

@zamotany zamotany commented Apr 3, 2020

No description provided.

Copy link
Contributor

@tido64 tido64 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works. Thanks for the quick fix!

Comment on lines 42 to 45
watchers.splice(watchers.indexOf(watcher), 1);
resolve('OK');
if (!watcher.notified) {
resolve('OK');
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this would also work:

        const index = watchers.indexOf(watcher);
        if (index >= 0) {
          watchers.splice(index, 1);
          resolve('OK');
        }

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am interested in this project!,
When is this bug fixed on main branch??

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be once I merge the PR and make a release.

@statm
Copy link
Contributor

statm commented Apr 7, 2020

Any update on this? Looks like build failed because of an extra --force flag at https://github.com/callstack/haul/blob/master/azure-pipelines.yml#L39

@zamotany
Copy link
Contributor Author

zamotany commented Apr 8, 2020

@statm
The E2E test on Azure Pipelines has been failing for quite some time. The --force flag is not the real issue, but the React Native Windows not compiling due to missing component. I've little experience in working with Windows and limited bandwidth to fix the issue.

@zamotany zamotany merged commit be384b0 into master Apr 8, 2020
@zamotany zamotany deleted the fix/live-reload branch April 8, 2020 13:18
@zamotany
Copy link
Contributor Author

zamotany commented Apr 8, 2020

Published under:

  • @haul-bundler/cli@0.18.1
  • @haul-bundler/core@0.18.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants