Skip to content

Commit

Permalink
#810, don't hash files in &%> if you don't have to
Browse files Browse the repository at this point in the history
  • Loading branch information
ndmitchell committed Sep 5, 2021
1 parent b2aad78 commit 458ecd5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Changelog for Shake (* = breaking change)

#810, don't hash files in &%> if you don't have to
0.19.5, released 2021-07-04
#807, fix space leak in Database module
#796, fix a bug with newCache dependencies
Expand Down
4 changes: 3 additions & 1 deletion src/Development/Shake/Internal/Rules/Files.hs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ ruleRun opts rebuildFlags k o@(fmap getEx -> old :: Maybe Result) mode = do
case v of
Just v -> case filesEqualValue opts old v of
NotEqual -> rebuild
EqualCheap -> pure $ RunResult ChangedNothing (fromJust o) v
-- See #810, important we pass old (which can be cheaply evaluated)
-- and not v, which might have some lazily-evaluated file hashes in
EqualCheap -> pure $ RunResult ChangedNothing (fromJust o) old
EqualExpensive -> pure $ RunResult ChangedStore (runBuilder $ putEx $ Result ver v) v
Nothing -> rebuild
_ -> rebuild
Expand Down

0 comments on commit 458ecd5

Please sign in to comment.