Is there a way to add a timeout option to feedback so it waits if lots of files are changing at the same time?
@erlandsona You're probably looking to configure this FS.defaultConfig:
https://github.com/NorfairKing/feedback/blob/9b2b037be77805507928238ec3c34abec9133631/feedback/src/Feedback/Loop.hs#L75
PR welcome!
Ah wait no that doesn't make sense because feedback will still run the first time anything happens. I'm not sure how you'd like this to work then. Can you elaborate?
Of course. Sorry we've got a make format task that runs stylish-haskell -i **/*.hs which touches every file in the project and if I forgot to kill feedback dev it'll trigger new build processes for every file being "changed" in the project.
Obviously the current workaround is to just kill the watcher before I run the formatter, but for LSP formatting it still can run away from me because I'll write the file then the formatter will write the file which can trigger 2 recompiles.
Of course the assumption here is that feedback is reliably killing the build whenever files change but sometimes the processes go rougue and I've got a free flyin' background stack build goin' until it finishes and no amount of ctrl-c can fix it.
@erlandsona So if I understand it well, you want a configurable threadDelay that happens after a change event and before the loop is rerun? Yeah PR welcome!
I guess? Or just denouncing on the file changed events? Not sure I can get to it any time soon but sounds good! Where should I look first to get started?
Option parsing goes here: https://github.com/NorfairKing/feedback/blob/master/feedback/src/Feedback/Common/OptParse.hs
Delay goes here: https://github.com/NorfairKing/feedback/blob/9b2b037be77805507928238ec3c34abec9133631/feedback/src/Feedback/Loop.hs#L172