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

Extend the recent work to solidify the FS watcher #593

Merged
merged 1 commit into from
Aug 22, 2023

Conversation

thedodd
Copy link
Member

@thedodd thedodd commented Aug 22, 2023

Ultimately, deeper investigation has revealed that std::fs::copy will generate modification events on the source file (the file being copied) on some platforms. This has proven to be a source of difficulty for the FS watcher, and has lead to infinite build loops, despite the fact that none of the files / directories being watched were actually changed.

Here we implement a post-build cooldown interval of 1s. This ensures that in very fast builds, we do not end up receiving a modification event due to std::fs::copy (from the copy source).

Moreover, any FS events which have accumulated during the 1s cooldown will be purged. Altogether this will hopefully fully address the recursive build issue, and will hopefully not disrupt the development workflow.

Related Issues

Checklist

  • Updated CHANGELOG.md describing pertinent changes.
  • Updated README.md with pertinent info (may not always apply).

@thedodd thedodd self-assigned this Aug 22, 2023
@thedodd thedodd added the enhancement New feature or request label Aug 22, 2023
@thedodd thedodd force-pushed the fix-recursive-build branch from 8d655f0 to a609e54 Compare August 22, 2023 00:59
Ultimately, deeper investigation has revealed that std::fs::copy will
generate modification events on the source file (the file being copied)
on some platforms. This has proven to be a source of difficulty for the
FS watcher, and has lead to infinite build loops, despite the fact that
none of the files / directories being watched were actually changed.

Here we implement a post-build cooldown interval of 1s. This ensures
that in very fast builds, we do not end up receiving a modification
event due to std::fs::copy (from the copy source).

Moreover, any FS events which have accumulated during the 1s cooldown
will be purged. Altogether this will hopefully fully address the
recursive build issue, and will hopefully not disrupt the development
workflow.

Also, update deps, changelog and a few README items.
@thedodd thedodd force-pushed the fix-recursive-build branch from a609e54 to efff459 Compare August 22, 2023 01:02
@thedodd thedodd merged commit f55b6a1 into master Aug 22, 2023
@thedodd thedodd deleted the fix-recursive-build branch August 22, 2023 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
1 participant