on master help sign in
Fix dependency cycle issue
46ae23dJasper Van der Jeugt
hakyll.cabal+1−1
@@ -1,5 +1,5 @@
1Name: hakyll
1Name: hakyll
2−Version: 4.1.1.0
2+Version: 4.1.2.0
3
3
4Synopsis: A static website compiler library
4Synopsis: A static website compiler library
5Description:
5Description:
src/Hakyll/Core/Runtime.hs+4−1
@@ -12,6 +12,7 @@ import Control.Monad.Reader (ask)
12import Control.Monad.RWS (RWST, runRWST)
12import Control.Monad.RWS (RWST, runRWST)
13import Control.Monad.State (get, modify)
13import Control.Monad.State (get, modify)
14import Control.Monad.Trans (liftIO)
14import Control.Monad.Trans (liftIO)
15+import Data.List (intercalate)
15import Data.Map (Map)
16import Data.Map (Map)
16import qualified Data.Map as M
17import qualified Data.Map as M
17import Data.Monoid (mempty)
18import Data.Monoid (mempty)
@@ -171,7 +172,9 @@ pickAndChase = do
171--------------------------------------------------------------------------------
172--------------------------------------------------------------------------------
172chase :: [Identifier] -> Identifier -> Runtime ()
173chase :: [Identifier] -> Identifier -> Runtime ()
173chase trail id'
174chase trail id'
174− | id' `elem` trail = return () -- Cycle detected!
175+ | id' `elem` trail = throwError $ "Hakyll.Core.Runtime.chase: " ++
176+ "Dependency cycle detected: " ++ intercalate " depends on "
177+ (map show $ dropWhile (/= id') (reverse trail) ++ [id'])
175 | otherwise = do
178 | otherwise = do
176 logger <- runtimeLogger <$> ask
179 logger <- runtimeLogger <$> ask
177 todo <- runtimeTodo <$> get
180 todo <- runtimeTodo <$> get
web/releases.markdown+7
@@ -2,6 +2,13 @@
2title: Releases
2title: Releases
3---
3---
4
4
5+## Hakyll 4.1.2.0
6+
7+*January 20, 2013*
8+
9+- Fix an issue where a dependency cycle would lead to infinite recursion/stack
10+ overflow
11+
5## Hakyll 4.1.1.0
12## Hakyll 4.1.1.0
6
13
7*January 20, 2013*
14*January 20, 2013*