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 like npm or bower. A solution could be to watch single directories, excluding problematic ones. My idea is to:
- Extract project structure information from both the solution file and the top-level
global.json "projects" key and use a bit of euristic (see later) to determine which subdirectories should be watched for changes.
- Look for exclude patterns in each subdirectory: this could be made configurable but ignoring
node_modules, bower_packages and other well-known names is probably a good start.
- For each subdirectory that doesn't contain anything to ignore just create a single watcher.
- For each subdirectory that contains something to ignore creare a top-level watcher with
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?
As discussed in #19 and other issues watching the full solution tree sometimes results in
too many open fileserrors, especially when one uses client-side package managers likenpmorbower. 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_packagesand other well-known names is probably a good start.IncludeSubdirectoriesset 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?