summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasper Van der Jeugt <m@jaspervdj.be>2013-01-20 21:55:40 +0100
committerJasper Van der Jeugt <m@jaspervdj.be>2013-01-20 21:55:40 +0100
commit46ae23d3269cbf980e435b818b81cb6285b2cfc3 (patch)
tree7a9cb86102c1a1ce2fd6036cc074e2042b278b9b
parent87735f9778d759da7059a0e8d00c91e888a06673 (diff)
downloadhakyll-46ae23d3269cbf980e435b818b81cb6285b2cfc3.tar.gz
Fix dependency cycle issue
-rw-r--r--hakyll.cabal2
-rw-r--r--src/Hakyll/Core/Runtime.hs5
-rw-r--r--web/releases.markdown7
3 files changed, 12 insertions, 2 deletions
diff --git a/hakyll.cabal b/hakyll.cabal
index 3b808a1..ce101c3 100644
--- a/hakyll.cabal
+++ b/hakyll.cabal
@@ -1,5 +1,5 @@
Name: hakyll
-Version: 4.1.1.0
+Version: 4.1.2.0
Synopsis: A static website compiler library
Description:
diff --git a/src/Hakyll/Core/Runtime.hs b/src/Hakyll/Core/Runtime.hs
index 39d72a7..b7dc4e8 100644
--- a/src/Hakyll/Core/Runtime.hs
+++ b/src/Hakyll/Core/Runtime.hs
@@ -12,6 +12,7 @@ import Control.Monad.Reader (ask)
import Control.Monad.RWS (RWST, runRWST)
import Control.Monad.State (get, modify)
import Control.Monad.Trans (liftIO)
+import Data.List (intercalate)
import Data.Map (Map)
import qualified Data.Map as M
import Data.Monoid (mempty)
@@ -171,7 +172,9 @@ pickAndChase = do
--------------------------------------------------------------------------------
chase :: [Identifier] -> Identifier -> Runtime ()
chase trail id'
- | id' `elem` trail = return () -- Cycle detected!
+ | id' `elem` trail = throwError $ "Hakyll.Core.Runtime.chase: " ++
+ "Dependency cycle detected: " ++ intercalate " depends on "
+ (map show $ dropWhile (/= id') (reverse trail) ++ [id'])
| otherwise = do
logger <- runtimeLogger <$> ask
todo <- runtimeTodo <$> get
diff --git a/web/releases.markdown b/web/releases.markdown
index 8e1d4e8..6e9bca0 100644
--- a/web/releases.markdown
+++ b/web/releases.markdown
@@ -2,6 +2,13 @@
title: Releases
---
+## Hakyll 4.1.2.0
+
+*January 20, 2013*
+
+- Fix an issue where a dependency cycle would lead to infinite recursion/stack
+ overflow
+
## Hakyll 4.1.1.0
*January 20, 2013*