Skip to content

Commit

Permalink
Increase diagnostic output
Browse files Browse the repository at this point in the history
  • Loading branch information
pepeiborra committed Mar 21, 2021
1 parent 4fd283a commit b96ee3b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/Development/Shake/Internal/Core/Run.hs
Original file line number Diff line number Diff line change
Expand Up @@ -212,12 +212,14 @@ updateDirtySet diag database (Just keys) = do
transitive <- flip State.execStateT Set.empty $ traverse_ loop ids

diag $
if null ids then pure "Could not compute transitive changes for unknown keys" else do
if null ids && not (null keys)
then pure "Could not compute transitive changes for unknown keys"
else do
let st = Set.size transitive
res = take 100 $ Set.toList transitive
ellipsis = if st > 100 then "..." else ""
keys <- unwords . map (show . fst) . catMaybes <$> mapM (getKeyValueFromId database) res
pure $ printf "%d transitive changes computed: %s%s" st keys ellipsis
res = take 500 $ Set.toList transitive
ellipsis = if st > 500 then "..." else ""
keys <- unlines . map (show . fst) . catMaybes <$> mapM (getKeyValueFromId database) res
pure $ printf "%d transitive changes computed: \n%s\n%s" st keys ellipsis

markDirty database transitive

Expand Down

0 comments on commit b96ee3b

Please sign in to comment.