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

Intelligently limit watches to certain directories #39

Open
cespare opened this issue Mar 3, 2017 · 0 comments
Open

Intelligently limit watches to certain directories #39

cespare opened this issue Mar 3, 2017 · 0 comments
Assignees

Comments

@cespare
Copy link
Owner

cespare commented Mar 3, 2017

It's quite common for people to run into open file limits problems because their working directory has a subdirectory with a giant tree in it. (Today's example was a node_modules dir.) There are workarounds listed at https://github.com/cespare/reflex#open-file-limits, but we could also do better directly without adding any other flags.

As I mentioned in #29 (comment), we could do something like this:

If the user passes something like -g api/*.py, instead of watching ./ and filtering against api/*.py, we can watch ./api/ and filter against *.py.

This can be extended to multiple globs and even regexps, where we can extract prefix directories.

If the user passes -g api/*.py -g tests/foo/bar/*.py, reflex can issue two watches, one in ./api/ and one in ./tests/foo/bar/.

In this way, we can automatically watch the most specific directories possible.

There are many caveats here, including:

  • We need to be careful about overlapping watches causing duplicates
  • Inverse matches need to be adjusted
@cespare cespare self-assigned this Mar 3, 2017
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

No branches or pull requests

1 participant