boot-clj / boot

Build tooling for Clojure.
https://boot-clj.github.io/
Eclipse Public License 1.0
1.75k stars 180 forks source link

Use bootignore patterns in watcher workers #663

Closed yannvanhalewyn closed 6 years ago

yannvanhalewyn commented 6 years ago

Boot uses the ignore patterns parsed from .bootignore when syncing src and resource directories, but not in the underlying watch processes. This PR offers a start to solving this discrepancy.

It is also a potential solution for people have node-modules / figwheel builds et ceterae in resource directories experiencing FSEvent dropouts on Mac OSX (eg: https://github.com/boot-clj/boot/issues/641) and improves performance in those cases - but mainly feels consistent.

note This won't exclude any added files after the watcher started, since the watchservices take dirs and don't have ignore options. It seems like that could be fixed in boot.file/watcher!. This also won't extend the watch task yet. It only will filter out .bootignore matches at register time when boot boots.

disclaimer I didn't test the entire build since make install fails with a TLS error. I just did not want to spend time debugging the build tool for debugging the build tool I was debugging. I did however test the adapted functions in a repl.

arichiardi commented 6 years ago

Thanks, seems sensible

alandipert commented 6 years ago

This looks good, thank you for your contribution! However it needs a CHANGES.md entry.

martinklepsch commented 6 years ago

@yannvanhalewyn Hey, would you mind adding an entry to CHANGES.md?

martinklepsch commented 6 years ago

I didn't test the entire build since make install fails with a TLS error. I just did not want to spend time debugging the build tool for debugging the build tool I was debugging. I did however test the adapted functions in a repl.

@yannvanhalewyn could you check if you can still reproduce this and open an issue with the full exception/error? Thanks a lot in advance! I hope we can reduce these kinds of issues to make contributing easier.

PS. feel free to ignore my request about adding stuff to the changelog, I'll do it once I merge this.