[commit: ghc] wip/nfs-locking: Add comments. (096f602)

git at git.haskell.org git at git.haskell.org
Fri Oct 27 00:04:12 UTC 2017


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

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

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

commit 096f6029109bf36ab29f2178942b62fdce884e26
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Tue Aug 11 00:24:24 2015 +0100

    Add comments.


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

096f6029109bf36ab29f2178942b62fdce884e26
 src/Oracles/ArgsHash.hs | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/Oracles/ArgsHash.hs b/src/Oracles/ArgsHash.hs
index f67f8c4..422cacd 100644
--- a/src/Oracles/ArgsHash.hs
+++ b/src/Oracles/ArgsHash.hs
@@ -17,6 +17,12 @@ newtype ArgsHashKey = ArgsHashKey Target
 -- argument list and computes its hash. The resulting value is tracked in a
 -- Shake oracle, hence initiating rebuilts when the hash is changed (a hash
 -- change indicates changes in the build system).
+-- Note: we replace target sources with ["src"] for performance reasons -- to
+-- avoid storing long lists of source files passed to some builders (e.g. Ar)
+-- in the Shake database. This optimisation is harmless, because argument list
+-- constructors are assumed not to examine target sources, but only append them
+-- to argument lists where appropriate.
+-- TODO: enforce the above assumption via type trickery?
 checkArgsHash :: FullTarget -> Action ()
 checkArgsHash target = do
     tmp <- askOracle . ArgsHashKey $ target { sources = ["src"] } :: Action Int



More information about the ghc-commits mailing list