[commit: ghc] wip/nfs-locking: Hash Target inputs in ArgsHashOracle. (ad44a95)

git at git.haskell.org git at git.haskell.org
Fri Oct 27 00:54:05 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/nfs-locking
Link       : http://ghc.haskell.org/trac/ghc/changeset/ad44a95b78bc2ed712c44f55b691203787b3df93/ghc

>---------------------------------------------------------------

commit ad44a95b78bc2ed712c44f55b691203787b3df93
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Tue Mar 8 01:35:17 2016 +0000

    Hash Target inputs in ArgsHashOracle.
    
    See #217.


>---------------------------------------------------------------

ad44a95b78bc2ed712c44f55b691203787b3df93
 src/Oracles/ArgsHash.hs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/Oracles/ArgsHash.hs b/src/Oracles/ArgsHash.hs
index aec0dc9..d3bfd61 100644
--- a/src/Oracles/ArgsHash.hs
+++ b/src/Oracles/ArgsHash.hs
@@ -23,8 +23,8 @@ newtype ArgsHashKey = ArgsHashKey Target
 -- TODO: Hash Target to improve accuracy and performance.
 checkArgsHash :: Target -> Action ()
 checkArgsHash target = when trackBuildSystem $ do
-    let firstInput = take 1 $ inputs target
-    _ <- askOracle . ArgsHashKey $ target { inputs = firstInput } :: Action Int
+    let hashed = [ show . hash $ inputs target ]
+    _ <- askOracle . ArgsHashKey $ target { inputs = hashed } :: Action Int
     return ()
 
 -- Oracle for storing per-target argument list hashes



More information about the ghc-commits mailing list