[GHC] #8144: Interface hashes include time stamp of included .h file when CPP is used
GHC
ghc-devs at haskell.org
Tue Aug 20 10:32:55 CEST 2013
#8144: Interface hashes include time stamp of included .h file when CPP is used
-------------------------------------------------+-------------------------
Reporter: nh2 | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.6.3
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Compile-time performance bug | Unknown/Multiple
Test Case: | Difficulty:
Blocking: | Unknown
| Blocked By:
| Related Tickets:
-------------------------------------------------+-------------------------
Comment (by nh2):
''UsageFile'' was introduced with ''addDependentFile'' in
https://github.com/ghc/ghc/commit/b994313.
The modification time being only (obtained) in second resolution is what
triggers the inconsistent behaviour.
Regarding that commit, I am also not sure how
https://github.com/ghc/ghc/commit/b994313#L3R1283 works:
{{{
checkModUsage _this_pkg UsageFile{ usg_file_path = file, usg_mtime =
old_mtime } = do
new_mtime <- liftIO $ getModificationTime file
return $ old_mtime /= new_mtime
}}}
I might be wrong, but it looks to me as if this can only ever return False
(''UpToDate'' in current GHC head) '''because''' the mtime is so coarse -
in other words if your computer is too slow, a second will pass and this
will never be considered up to date?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8144#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list