on master help sign in
Fix dependency cycle issue
commit46ae23d3269cbf980e435b818b81cb6285b2cfc3 authorJasper Van der Jeugt <m@jaspervdj.be> dateSun 20 Jan 2013, 21:55 (14 years ago) parent87735f9
3 files changed+12−2
hakyll.cabal+1−1 src/Hakyll/Core/Runtime.hs+4−1 web/releases.markdown+7
hakyll.cabal+1−1
@@ -1,5 +1,5 @@
11Name: hakyll
2−Version: 4.1.1.0
2+Version: 4.1.2.0
33
44Synopsis: A static website compiler library
55Description:
src/Hakyll/Core/Runtime.hs+4−1
@@ -12,6 +12,7 @@ import Control.Monad.Reader (ask)
1212import Control.Monad.RWS (RWST, runRWST)
1313import Control.Monad.State (get, modify)
1414import Control.Monad.Trans (liftIO)
15+import Data.List (intercalate)
1516import Data.Map (Map)
1617import qualified Data.Map as M
1718import Data.Monoid (mempty)
@@ -171,7 +172,9 @@ pickAndChase = do
171172--------------------------------------------------------------------------------
172173chase :: [Identifier] -> Identifier -> Runtime ()
173174chase 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'])
175178 | otherwise = do
176179 logger <- runtimeLogger <$> ask
177180 todo <- runtimeTodo <$> get
web/releases.markdown+7
@@ -2,6 +2,13 @@
22title: Releases
33---
44
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+
512## Hakyll 4.1.1.0
613
714*January 20, 2013*