Closed codygman closed 3 years ago
We probably want to add a CustomDebounce (Event -> Bool)
case to the Debounce sum type.
What confuses me though, is searching for function debounce I can't actually find where it's used.
Hi @codygman, sorry for the delay. It's actually an explicit goal of this library at the moment to decouple and remove debouncing support. Debouncing is really orthogonal to file watching, so it's not this library's place to do it, even though historically it has.
It's recommended to disable debouncing on this library and do your own debouncing in your event handler.
Debouncing is really orthogonal to file watching
Can you expand on this? How is it orthogonal in your opinion?
I simply mean a library should do one thing and do it well. This is a library for watching files and firing events when they change. Debouncing is a separate concern that can be managed independently (with your own custom code, or with another library like Control.Debounce).
Tidying up old issues, going to close this one as wontfix.
I have a use case where I just want to debounce for a time interval and not care about if it's the same file.
Say I modify
a.hs
,b.hs
, andc.hs
in my editor. Then I save them all at once. The action that I have specified will be run 3 times.