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 mysteriously disappearing "expose" and "entry" #80

Merged
1 commit merged into from
Apr 20, 2015
Merged

Fix mysteriously disappearing "expose" and "entry" #80

1 commit merged into from
Apr 20, 2015

Conversation

zertosh
Copy link
Member

@zertosh zertosh commented Apr 19, 2015

This fixes a nasty race condition that would result in disappearing expose and entry on rows (see browserify/watchify#177).

This happens when an input row (A) depends on another module that is also input row (B), and A finishes the dep parsing before B has resolved. This dependence is very typical with React. One module finishing parsing before another has even resolved happens pretty much always with watchify caching.

The solution proposed is to simply wait until the input rows have been resolved before continuing with their deps.

Out of the 4 tests added, only "test/cache_partial_expose.js" illustrates this bug. The rest are there because caching had no tests. I also tested Browserify with this fix and it all checks out.

cc: @jmm @substack

@zertosh
Copy link
Member Author

zertosh commented Apr 20, 2015

cc: @terinjokes

@ghost ghost merged commit 9080ba9 into browserify:master Apr 20, 2015
@ghost
Copy link

ghost commented Apr 20, 2015

Looks great, thanks for all the work!

@zertosh
Copy link
Member Author

zertosh commented Apr 20, 2015

Thanks @substack! 😄

This pull request was closed.
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.

1 participant