ndmitchell / ghcid

Very low feature GHCi based IDE
Other
1.13k stars 114 forks source link

how to tell --reload to ignore emacs lock files? #315

Open jwaldmann opened 4 years ago

jwaldmann commented 4 years ago

Hi. I am using

ghcid --reload=test-data/ -W -Tt1 -- -freverse-errors -isrc Main.hs

since evalution of t1 will read some files from test-data. It's great that this works (and traverses test-data recursively) but it's somewhat eager:

The test gets run twice: once when I actually save one such data file, and then when I change the file in the editor (without saving) since Emacs then creates a lock file (https://www.gnu.org/software/emacs/manual/html_node/elisp/File-Locks.html).

It seems that ghcid notices creation and deletion of lock files, or the resulting modification of the containing directory.

Is there a way to tell ghcid to ignore these files/events?

ndmitchell commented 4 years ago

Unfortunately, not at the moment. The solution would be to integrate the filepattern library into Ghcid, so the --reload could take a pattern, which could include only the data files. However, I don't have any work planned to do that - but contributions welcome.