-
Notifications
You must be signed in to change notification settings - Fork 195
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
feat: do not watch .direnv and .devenv subdirectories #1733
feat: do not watch .direnv and .devenv subdirectories #1733
Conversation
When a directory is added or removed from the root directory of the application, we start or stop watching it accordingly.
7adac3d
to
e49d955
Compare
c6ce6c4
to
8829bd4
Compare
When we stop watching a directory we do not need to test whether it is watchable or not. It being in the WatchedDirectories state is sufficient
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 👍 Looks good to me.
Just one tiny thing: Can we switch to 4 space indentation? (That's mostly the standard across the IHP code base, except some nix files)
Sure thing, my editor setup might be messed up. |
Thanks again for the PR :) 👍 |
Welcome! It's a pleasure contributing to IHP. |
Changes here break auto reloading in my project, also using Ubuntu based distro, have to investigate. |
Was it working before this commit? It really shouldn't change anything except for the fact that we exclude a few select directories from the file watcher. Do you have large directories within your project root? |
The file watcher used by the dev server to automatically reload on changes seems to have issues with large directories with Ubuntu (see #1714).
The System.FSNotify API does not allow us to exclude sub-trees from the paths watched by
watchTree
. Instead we can watch file changes in the root directory usingwatchDir
and usewatchTree
on sub-directories excluding.direnv
and.devenv
which are known to be large directories and are not relevant with regard do reloading.We also keep track of directories added and removed from the root directory and watch them accordingly.