on master help sign in
Fix skipping certain compilers error
b867e6fJasper Van der Jeugt
src/Hakyll/Core/DirectedGraph.hs+9
@@ -4,6 +4,7 @@
4module Hakyll.Core.DirectedGraph
4module Hakyll.Core.DirectedGraph
5 ( DirectedGraph
5 ( DirectedGraph
6 , fromList
6 , fromList
7+ , member
7 , nodes
8 , nodes
8 , neighbours
9 , neighbours
9 , reverse
10 , reverse
@@ -27,6 +28,14 @@ fromList :: Ord a
27 -> DirectedGraph a -- ^ Resulting directed graph
28 -> DirectedGraph a -- ^ Resulting directed graph
28fromList = DirectedGraph . M.fromList . map (\(t, d) -> (t, Node t d))
29fromList = DirectedGraph . M.fromList . map (\(t, d) -> (t, Node t d))
29
30
31+-- | Check if a node lies in the given graph
32+--
33+member :: Ord a
34+ => a -- ^ Node to check for
35+ -> DirectedGraph a -- ^ Directed graph to check in
36+ -> Bool -- ^ If the node lies in the graph
37+member n = M.member n . unDirectedGraph
38+
30-- | Get all nodes in the graph
39-- | Get all nodes in the graph
31--
40--
32nodes :: Ord a
41nodes :: Ord a
src/Hakyll/Core/Run.hs+2−5
@@ -95,10 +95,7 @@ addNewCompilers oldCompilers newCompilers = Hakyll $ do
95 provider <- hakyllResourceProvider <$> ask
95 provider <- hakyllResourceProvider <$> ask
96 store <- hakyllStore <$> ask
96 store <- hakyllStore <$> ask
97
97
98− let -- Create a set of new compilers
99− newCompilerIdentifiers = S.fromList $ map fst newCompilers
100−
101− -- All compilers
98+ let -- All compilers
102 compilers = oldCompilers ++ newCompilers
99 compilers = oldCompilers ++ newCompilers
103
100
104 -- Get all dependencies for the compilers
101 -- Get all dependencies for the compilers
@@ -128,7 +125,7 @@ addNewCompilers oldCompilers newCompilers = Hakyll $ do
128 -- Find obsolete items. Every item that is reachable from a modified
125 -- Find obsolete items. Every item that is reachable from a modified
129 -- item is considered obsolete. From these obsolete items, we are only
126 -- item is considered obsolete. From these obsolete items, we are only
130 -- interested in ones that are in the current subgraph.
127 -- interested in ones that are in the current subgraph.
131− obsolete = S.filter (`S.member` newCompilerIdentifiers)
128+ obsolete = S.filter (`member` currentGraph)
132 $ reachableNodes modified' $ reverse completeGraph
129 $ reachableNodes modified' $ reverse completeGraph
133
130
134 -- Solve the graph and retain only the obsolete items
131 -- Solve the graph and retain only the obsolete items