summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2021-05-05 14:02:37 +0100
committerMatthew Pickering <matthewtpickering@gmail.com>2021-06-03 08:46:47 +0100
commit25977ab542a30df4ae71d9699d015bcdd1ab7cfb (patch)
treefc2195f9ceb5651603aa5fed03580eb47e0412d7 /utils
parent79d12d34ad7177d33b191305f2c0157349f97355 (diff)
downloadhaskell-25977ab542a30df4ae71d9699d015bcdd1ab7cfb.tar.gz
Driver Rework Patch
This patch comprises of four different but closely related ideas. The net result is fixing a large number of open issues with the driver whilst making it simpler to understand. 1. Use the hash of the source file to determine whether the source file has changed or not. This makes the recompilation checking more robust to modern build systems which are liable to copy files around changing their modification times. 2. Remove the concept of a "stable module", a stable module was one where the object file was older than the source file, and all transitive dependencies were also stable. Now we don't rely on the modification time of the source file, the notion of stability is moot. 3. Fix TH/plugin recompilation after the removal of stable modules. The TH recompilation check used to rely on stable modules. Now there is a uniform and simple way, we directly track the linkables which were loaded into the interpreter whilst compiling a module. This is an over-approximation but more robust wrt package dependencies changing. 4. Fix recompilation checking for dynamic object files. Now we actually check if the dynamic object file exists when compiling with -dynamic-too Fixes #19774 #19771 #19758 #17434 #11556 #9121 #8211 #16495 #7277 #16093
Diffstat (limited to 'utils')
-rw-r--r--utils/check-exact/Main.hs3
-rw-r--r--utils/check-ppr/Main.hs2
2 files changed, 3 insertions, 2 deletions
diff --git a/utils/check-exact/Main.hs b/utils/check-exact/Main.hs
index 63eabff460..b67efa2039 100644
--- a/utils/check-exact/Main.hs
+++ b/utils/check-exact/Main.hs
@@ -33,6 +33,7 @@ import GHC.Parser.Lexer
import GHC.Data.FastString
import GHC.Types.SrcLoc
+
-- ---------------------------------------------------------------------
_tt :: IO ()
@@ -346,7 +347,7 @@ parseOneFile libdir fileName =
let dflags2 = dflags `gopt_set` Opt_KeepRawTokenStream
_ <- setSessionDynFlags dflags2
hsc_env <- getSession
- emodSum <- liftIO $ summariseFile hsc_env [] fileName Nothing True Nothing
+ emodSum <- liftIO $ summariseFile hsc_env [] fileName Nothing Nothing
case emsModSummary <$> emodSum of
Left _err -> error "parseOneFile"
Right modSum -> do
diff --git a/utils/check-ppr/Main.hs b/utils/check-ppr/Main.hs
index 80828874f6..d064431ec4 100644
--- a/utils/check-ppr/Main.hs
+++ b/utils/check-ppr/Main.hs
@@ -85,7 +85,7 @@ parseOneFile libdir fileName = do
let dflags2 = dflags `gopt_set` Opt_KeepRawTokenStream
_ <- setSessionDynFlags dflags2
hsc_env <- getSession
- ms <- liftIO $ summariseFile hsc_env [] fileName Nothing True Nothing
+ ms <- liftIO $ summariseFile hsc_env [] fileName Nothing Nothing
case ms of
Left _err -> error "parseOneFile"
Right ems -> parseModule (emsModSummary ems)