dune_file_watcher: do not exclude _opam and _esy systematically#7086
dune_file_watcher: do not exclude _opam and _esy systematically#7086nojb wants to merge 2 commits intoocaml:mainfrom
Conversation
Signed-off-by: Nicolás Ojeda Bär <n.oje.bar@gmail.com>
|
Could we just have a command line option / dune-project config item / environment variable for “don’t use default exclusion rules”? I think that Boolean would be simplest. But perhaps we can let the user specify the exact exclusion rules as a list of strings (ex. semicolon separated list of rules) instead. Maybe I’m the only one in the world, but I have huge node_modules/ directories inside my source tree when I get Dune to generate JS. And large Conda (Python) environments when I mix OCaml with Sphinx. |
|
I also think that removing _opam and _esy from the default list should be opt-in. Many users have a local switch in _opam so it doesn't make sense to inconvenience the majority. A command line option or a workspace option to remove the default paths would make more sense. |
|
I don't know my way around the dune codebase. This could be something I can take over though if someone could point me to an example in the code of using a workspace option. |
|
To start, you can just make the patterns configurable. The fact that they're hard coded now means that there's now way to customize them from the code at all. Once you do that, you can add the appropriate option to |
|
Being able to customize the set of exclusion patterns seems the better way to go, so I'll close this one. |
As discussed in the thread starting at #7010 (comment), it seems that it is not right to systematically exclude
_opam(and_esy) from the file notification watchers, since these directories may be added explicitly to the Dune build (eg by using(vendored_dirs ...)).cc @jonahbeckford @rgrinberg