on master help sign in
Bump fsnotify to 0.2
df2bc9fJasper Van der Jeugt
hakyll.cabal+4−4
@@ -171,7 +171,7 @@ Library
171 Build-depends:
171 Build-depends:
172 snap-core >= 0.6 && < 0.10,
172 snap-core >= 0.6 && < 0.10,
173 snap-server >= 0.6 && < 0.10,
173 snap-server >= 0.6 && < 0.10,
174− fsnotify >= 0.1 && < 0.2,
174+ fsnotify >= 0.2 && < 0.3,
175 system-filepath >= 0.4.6 && <= 0.5
175 system-filepath >= 0.4.6 && <= 0.5
176 Cpp-options:
176 Cpp-options:
177 -DPREVIEW_SERVER
177 -DPREVIEW_SERVER
@@ -181,7 +181,7 @@ Library
181
181
182 If flag(watchServer)
182 If flag(watchServer)
183 Build-depends:
183 Build-depends:
184− fsnotify >= 0.1 && < 0.2,
184+ fsnotify >= 0.2 && < 0.3,
185 system-filepath >= 0.4.6 && <= 0.5
185 system-filepath >= 0.4.6 && <= 0.5
186 Cpp-options:
186 Cpp-options:
187 -DWATCH_SERVER
187 -DWATCH_SERVER
@@ -256,7 +256,7 @@ Test-suite hakyll-tests
256 Build-depends:
256 Build-depends:
257 snap-core >= 0.6 && < 0.10,
257 snap-core >= 0.6 && < 0.10,
258 snap-server >= 0.6 && < 0.10,
258 snap-server >= 0.6 && < 0.10,
259− fsnotify >= 0.1 && < 0.2,
259+ fsnotify >= 0.2 && < 0.3,
260 system-filepath >= 0.4.6 && <= 0.5
260 system-filepath >= 0.4.6 && <= 0.5
261 Cpp-options:
261 Cpp-options:
262 -DPREVIEW_SERVER
262 -DPREVIEW_SERVER
@@ -266,7 +266,7 @@ Test-suite hakyll-tests
266
266
267 If flag(watchServer)
267 If flag(watchServer)
268 Build-depends:
268 Build-depends:
269− fsnotify >= 0.1 && < 0.2,
269+ fsnotify >= 0.2 && < 0.3,
270 system-filepath >= 0.4.6 && <= 0.5
270 system-filepath >= 0.4.6 && <= 0.5
271 Cpp-options:
271 Cpp-options:
272 -DWATCH_SERVER
272 -DWATCH_SERVER
src/Hakyll/Preview/Poll.hs+3−4
@@ -12,7 +12,6 @@ import Control.Concurrent.MVar (newEmptyMVar, takeMVar,
12import Control.Exception (AsyncException, fromException,
12import Control.Exception (AsyncException, fromException,
13 handle, throw)
13 handle, throw)
14import Control.Monad (forever, void, when)
14import Control.Monad (forever, void, when)
15−import Filesystem.Path.CurrentOS (decodeString, encodeString)
16import System.Directory (canonicalizePath)
15import System.Directory (canonicalizePath)
17import System.FilePath (pathSeparators)
16import System.FilePath (pathSeparators)
18import System.FSNotify (Event (..), startManager,
17import System.FSNotify (Event (..), startManager,
@@ -41,7 +40,7 @@ import Hakyll.Core.Identifier.Pattern
41-- a site as soon as any changes occur
40-- a site as soon as any changes occur
42watchUpdates :: Configuration -> IO Pattern -> IO ()
41watchUpdates :: Configuration -> IO Pattern -> IO ()
43watchUpdates conf update = do
42watchUpdates conf update = do
44− let providerDir = decodeString $ providerDirectory conf
43+ let providerDir = providerDirectory conf
45 shouldBuild <- newEmptyMVar
44 shouldBuild <- newEmptyMVar
46 pattern <- update
45 pattern <- update
47 fullProviderDir <- canonicalizePath $ providerDirectory conf
46 fullProviderDir <- canonicalizePath $ providerDirectory conf
@@ -66,7 +65,7 @@ watchUpdates conf update = do
66 (\e -> case fromException e of
65 (\e -> case fromException e of
67 Nothing -> putStrLn (show e)
66 Nothing -> putStrLn (show e)
68 Just async -> throw (async :: AsyncException))
67 Just async -> throw (async :: AsyncException))
69− (update' event $ encodeString providerDir)
68+ (update' event providerDir)
70
69
71 -- Send an event whenever something occurs so that the thread described
70 -- Send an event whenever something occurs so that the thread described
72 -- above will do a build.
71 -- above will do a build.
@@ -107,7 +106,7 @@ watchUpdates conf update = do
107
106
108--------------------------------------------------------------------------------
107--------------------------------------------------------------------------------
109eventPath :: Event -> FilePath
108eventPath :: Event -> FilePath
110−eventPath evt = encodeString $ evtPath evt
109+eventPath evt = evtPath evt
111 where
110 where
112 evtPath (Added p _) = p
111 evtPath (Added p _) = p
113 evtPath (Modified p _) = p
112 evtPath (Modified p _) = p
web/releases.markdown+4
@@ -4,6 +4,10 @@ title: Releases
4
4
5# Releases
5# Releases
6
6
7+## Hakyll 4.7.2.1
8+
9+- Bump fsnotify dependency to 0.2
10+
7## Hakyll 4.7.2.0
11## Hakyll 4.7.2.0
8
12
9- Improve documentation of `getResourceXXX` functions (contribution by Matthias
13- Improve documentation of `getResourceXXX` functions (contribution by Matthias