[GHC] #8144: Interface hashes include time stamp of dependent files (UsageFile mtime)

GHC ghc-devs at haskell.org
Thu Aug 22 23:25:32 CEST 2013


#8144: Interface hashes include time stamp of dependent files (UsageFile mtime)
-------------------------------------------------+-------------------------
        Reporter:  nh2                           |            Owner:  nh2
            Type:  bug                           |           Status:  patch
        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 Austin Seipp <aseipp@…>):

 In [changeset:677820ee3a3aadbf2ed414deb3926381d94b13a8/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="677820ee3a3aadbf2ed414deb3926381d94b13a8"
 Fix interface hashes including time stamp of dependent files.

 Fixes #8144.

 Before, the modification time of e.g. #included files (and everything
 that ends up as a UsageFile, e.g. via addDependentFile) was taken as
 input for the interface hash of a module.

 This lead to different hashes for identical inputs on every compilation.

 We now use file content hashes instead.

 This changes the interface file format.
 You will get "Binary.get(Usage): 50" when you try to do an incremental
 using .hi files that were created with a GHC 7.7 (only) older than this
 commit.

 To calculate the md5 hash (`Fingerprint`) of a file in constant space,
 there now is GHC.Fingerprint.getFileHash, and a fallback version
 for older GHCs that needs to load the file into memory completely
 (only used when compiling stage1 with an older GHC).

 Signed-off-by: Austin Seipp <aseipp at pobox.com>
 }}}

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8144#comment:13>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler




More information about the ghc-tickets mailing list