From ea52c3d620d83e8878d59e37158a04acedea9fd9 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Tue, 3 Jul 2018 12:46:56 +0100 Subject: [PATCH] ui: restore support for fsnotify 0.2.1.2, as well as 0.3.x (#833) For easier stackage entry. --- hledger-ui/Hledger/UI/Main.hs | 7 ++++++- hledger-ui/hledger-ui.cabal | 4 ++-- hledger-ui/package.yaml | 2 +- stack.yaml | 5 +---- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/hledger-ui/Hledger/UI/Main.hs b/hledger-ui/Hledger/UI/Main.hs index 27bf9f351..63d354284 100644 --- a/hledger-ui/Hledger/UI/Main.hs +++ b/hledger-ui/Hledger/UI/Main.hs @@ -212,7 +212,12 @@ runBrickUi uopts@UIOpts{cliopts_=copts@CliOpts{reportopts_=ropts}} j = do d -- predicate: ignore changes not involving our files (\fev -> case fev of - Modified f _ False -> f `elem` files +#if MIN_VERSION_fsnotify(0,3,0) + Modified f _ False +#else + Modified f _ +#endif + -> f `elem` files -- Added f _ -> f `elem` files -- Removed f _ -> f `elem` files -- we don't handle adding/removing journal files right now diff --git a/hledger-ui/hledger-ui.cabal b/hledger-ui/hledger-ui.cabal index 9d50b3889..6374f06c4 100644 --- a/hledger-ui/hledger-ui.cabal +++ b/hledger-ui/hledger-ui.cabal @@ -2,7 +2,7 @@ -- -- see: https://github.com/sol/hpack -- --- hash: 93120fb2299854b48774c4d03660702d22bd43021aa4030f664636b8bc0d0738 +-- hash: 8d627646c88a184e5c5ceee98240bc0a5e80936fb197fef9b480c422526f1d7c name: hledger-ui version: 1.10 @@ -75,7 +75,7 @@ executable hledger-ui , data-default , directory , filepath - , fsnotify >=0.3.0.1 + , fsnotify >=0.2.1.2 && <0.4 , hledger >=1.10 && <1.11 , hledger-lib >=1.10 && <1.11 , megaparsec >=6.4.1 diff --git a/hledger-ui/package.yaml b/hledger-ui/package.yaml index e925a5455..7d41c7ce8 100644 --- a/hledger-ui/package.yaml +++ b/hledger-ui/package.yaml @@ -51,7 +51,7 @@ dependencies: - data-default - directory - filepath -- fsnotify >=0.3.0.1 +- fsnotify >=0.2.1.2 && <0.4 - HUnit - microlens >=0.4 - microlens-platform >=0.2.3.1 diff --git a/stack.yaml b/stack.yaml index e114a9191..0206c0a38 100644 --- a/stack.yaml +++ b/stack.yaml @@ -9,10 +9,7 @@ packages: - hledger-web - hledger-api -extra-deps: -# hledger-ui -# newer fsnotify has a different api and may be more robust -- fsnotify-0.3.0.1 +#extra-deps: nix: pure: false