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

[feature request] Option to disable recursive dir watch #227

Closed
gecon opened this issue Nov 25, 2021 · 4 comments · Fixed by #827
Closed

[feature request] Option to disable recursive dir watch #227

gecon opened this issue Nov 25, 2021 · 4 comments · Fixed by #827
Labels
new feature Requests or requires a new feature

Comments

@gecon
Copy link

gecon commented Nov 25, 2021

It would be handy to be able to avoid recursive watches on a directory.
Practical as we want to watch only for changes on a directory, but not subdirectories with a lot of GB of files.

Thank you for your great work.

@passcod passcod added the new feature Requests or requires a new feature label Nov 25, 2021
@abitrolly

This comment has been minimized.

@passcod

This comment has been minimized.

@unphased
Copy link

unphased commented Mar 30, 2023

Yeah. This is needed if I have a dir with GBs of data files and some source files in project root that I want to pick up. For example

project/
    code_1
    code_2
    ... (imagine 100 more code files)
    data/
        GB upon GB of data files

Note how the only performant way to do this (which is still not really performant) is to watchexec with -w code_1 -w code_2 .... The solution is definitely to specify a non-recursive watch on project/ which will cause content in project/data/ to be excluded as intended.

In actual practice, this is perhaps a rare situation since any sane project layout would have the code under src/ or some such. But conceptually it's a rather big hole in the design of this CLI interface.

passcod added a commit that referenced this issue Apr 28, 2024
Fixes #227
Fixes #174

docs(cli): be more precise in print-events advice to use `-v`
docs(cli): improve jaq error help
feat(cli): add `-W` for non-recursive watches
feat(cli): use non-blocking logging
feat(globset): hide `fmt::Debug` spew from ignore crate
feat(ignore-files): hide `fmt::Debug` spew from ignore crate
feat(lib): make it possible to watch non-recursively
fix(lib): inserting `WatchedPath`s directly should be possible
refactor(lib): move `WatchedPath` out of `fs` mod
@passcod
Copy link
Member

passcod commented Apr 28, 2024

Released in 2.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature Requests or requires a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants