mirror of
https://github.com/simonmichael/hledger.git
synced 2024-12-25 19:31:44 +03:00
imp: ui: support/require fsnotify 0.4.x
This commit is contained in:
parent
f0b16f22a2
commit
45ee5d125d
@ -23,7 +23,7 @@ import Graphics.Vty (mkVty, Mode (Mouse), Vty (outputIface), Output (setMode))
|
||||
import Lens.Micro ((^.))
|
||||
import System.Directory (canonicalizePath)
|
||||
import System.FilePath (takeDirectory)
|
||||
import System.FSNotify (Event(Modified), isPollingManager, watchDir, withManager)
|
||||
import System.FSNotify (Event(Modified), watchDir, withManager, EventIsDirectory (IsFile))
|
||||
import Brick hiding (bsDraw)
|
||||
import qualified Brick.BChan as BC
|
||||
|
||||
@ -201,7 +201,6 @@ runBrickUi uopts0@UIOpts{uoCliOpts=copts@CliOpts{inputopts_=_iopts,reportspec_=r
|
||||
-- with Debounce at the default 1ms it clears transient errors itself
|
||||
-- but gets tied up for ages
|
||||
withManager $ \mgr -> do
|
||||
dbg1IO "fsnotify using polling ?" $ isPollingManager mgr
|
||||
files <- mapM (canonicalizePath . fst) $ jfiles j
|
||||
let directories = nubSort $ map takeDirectory files
|
||||
dbg1IO "files" files
|
||||
@ -212,7 +211,7 @@ runBrickUi uopts0@UIOpts{uoCliOpts=copts@CliOpts{inputopts_=_iopts,reportspec_=r
|
||||
d
|
||||
-- predicate: ignore changes not involving our files
|
||||
(\case
|
||||
Modified f _ False -> f `elem` files
|
||||
Modified f _ IsFile -> f `elem` files
|
||||
-- Added f _ -> f `elem` files
|
||||
-- Removed f _ -> f `elem` files
|
||||
-- we don't handle adding/removing journal files right now
|
||||
|
@ -62,7 +62,7 @@ dependencies:
|
||||
- doclayout >=0.3 && <0.5
|
||||
- extra >=1.6.3
|
||||
- filepath
|
||||
- fsnotify >=0.2.1.2 && <0.4
|
||||
- fsnotify >=0.4 && <0.5
|
||||
- microlens >=0.4
|
||||
- microlens-platform >=0.2.3.1
|
||||
- megaparsec >=7.0.0 && <9.3
|
||||
|
@ -14,6 +14,7 @@ extra-deps:
|
||||
# for hledger:
|
||||
# for hledger-ui:
|
||||
- brick-1.0
|
||||
- fsnotify-0.4.0.0
|
||||
# for hledger-web:
|
||||
# for Shake.hs:
|
||||
|
||||
|
@ -20,6 +20,7 @@ extra-deps:
|
||||
# for hledger-ui:
|
||||
- brick-1.0
|
||||
- bimap-0.5.0
|
||||
- fsnotify-0.4.0.0
|
||||
- text-zipper-0.12
|
||||
- vty-5.36
|
||||
# for hledger-web:
|
||||
|
@ -23,6 +23,7 @@ extra-deps:
|
||||
# for hledger-ui:
|
||||
- brick-1.0
|
||||
- bimap-0.5.0
|
||||
- fsnotify-0.4.0.0
|
||||
- text-zipper-0.12
|
||||
- vty-5.36
|
||||
# for hledger-web:
|
||||
|
Loading…
Reference in New Issue
Block a user