[commit: ghc] wip/nfs-locking: Optimise buildPackageDependencies rule. (1e5c095)

git at git.haskell.org git at git.haskell.org
Thu Oct 26 23:50:53 UTC 2017


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

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

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

commit 1e5c0952d044d8c1c16988e221d014443b04fb19
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Tue Jan 13 03:30:54 2015 +0000

    Optimise buildPackageDependencies rule.


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

1e5c0952d044d8c1c16988e221d014443b04fb19
 src/Package/Dependencies.hs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/Package/Dependencies.hs b/src/Package/Dependencies.hs
index 7390b2e..6339adb 100644
--- a/src/Package/Dependencies.hs
+++ b/src/Package/Dependencies.hs
@@ -22,5 +22,7 @@ buildPackageDependencies (Package name path _) (stage, dist, settings) =
             -- TODO: i) is this needed? ii) shall we run GHC -M multiple times?
             -- <> wayHcOpts vanilla
         -- Avoid rebuilding dependecies of out if it hasn't changed:
-        copyFileChanged (out <.> "new") out
+        -- Note: cannot use copyFileChanged as it depends on the source file
+        deps <- liftIO $ readFile $ out <.> "new"
+        writeFileChanged out deps
         removeFilesAfter "." [out <.> "new"]



More information about the ghc-commits mailing list