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

dev/watchman: merge file change events while running handle changed #10119

Merged
merged 3 commits into from Apr 22, 2020

Conversation

keegancsmith
Copy link
Member

Watchman only sends file change events once the FS is settled. However, it
isn't aware of our handleChanged process, so if a dev is still saving files
while the compiler is running the events would queue up. This would lead to
our watchman wrapper running handle changed several times. We now dedup the
watch events while the compilation is running before calling it again.

This is a refactor to make the next commit clearer. There should be no
functionality change introduced by this commit.
Watchman only sends file change events once the FS is settled. However, it
isn't aware of our handleChanged process, so if a dev is still saving files
while the compiler is running the events would queue up. This would lead to
our watchman wrapper running handle changed several times. We now dedup the
watch events while the compilation is running before calling it again.
@keegancsmith keegancsmith added this to the 3.16 milestone Apr 22, 2020
@keegancsmith keegancsmith requested a review from a team April 22, 2020 07:09
@keegancsmith keegancsmith requested a review from a team as a code owner April 22, 2020 07:09
@tsenart tsenart mentioned this pull request Apr 22, 2020
67 tasks
@keegancsmith
Copy link
Member Author

@mrnugget sent this PR and #10085 to improve watchman in dev. You should switch back to using watchman (and use it as your git fs monitor). If it starts acting up, you can set WATCHMAN_DEBUG=1 to see the events and potentially adjust the expression to exclude a file.

@codecov
Copy link

codecov bot commented Apr 22, 2020

Codecov Report

Merging #10119 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master   #10119   +/-   ##
=======================================
  Coverage   42.75%   42.75%           
=======================================
  Files        1348     1348           
  Lines       74123    74123           
  Branches     6651     6651           
=======================================
  Hits        31690    31690           
  Misses      39571    39571           
  Partials     2862     2862           
Flag Coverage Δ
#unit 42.75% <ø> (ø)

dev/watchmanwrapper/main.go Show resolved Hide resolved
@unknwon
Copy link
Member

unknwon commented Apr 22, 2020

Thanks for improving this 😭

Copy link
Contributor

@mrnugget mrnugget left a comment

Choose a reason for hiding this comment

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

Nice! I'll give it a shot again, yes :)

@keegancsmith keegancsmith merged commit 24c129b into master Apr 22, 2020
@keegancsmith keegancsmith deleted the core/watchman branch April 22, 2020 09:47
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.

None yet

3 participants