-
Notifications
You must be signed in to change notification settings - Fork 11
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
Smart file watching #24
Comments
It would need to handle new directories that get created or new projects being added. I wonder if there is any problem creating lots of individual file watchers. I am still tempted to just rely on the IDE detecting file changes since this feature already exists and may be simpler to implement. It also completely fixes the too many files problem. |
I fear that the IDE will not detect files added from the outside but I don't know about this part of MonoDevelop: which files exactly does it watch? |
Yeah I agree it may not detect files added outside the IDE. How often does adding files outside the IDE happen in practice? I was assuming that if you are in the IDE then you are adding new files using the IDE. The IDE will detect files that have changed that it knows about. For example if you edit a .csproj file outside the IDE when you switch back to the IDE it knows the file has changed and will reload the project file. New files are different problem. This could be handled by rescanning the directories when the IDE receives focus again. Or maybe this is not automatic and instead the user can refresh a directory themselves in the solution window. Right now if you add a new directory or files the solution window will not be updated even though the file watcher will detect this and be sending the files to the DNX host. However this is just something that was not yet implemented. |
As discussed in #19 and other issues watching the full solution tree sometimes results in
too many open files
errors, especially when one uses client-side package managers likenpm
orbower
. A solution could be to watch single directories, excluding problematic ones. My idea is to:global.json
"projects"
key and use a bit of euristic (see later) to determine which subdirectories should be watched for changes.node_modules
,bower_packages
and other well-known names is probably a good start.IncludeSubdirectories
set to false and then one watcher for every directory.We will end up with more watchers than strictly necessary but, given that one usually doesn't have tens of directories inside each project, not that much more.
Does this seems sensible or am I missing something?
The text was updated successfully, but these errors were encountered: