patch applied (ghc): Use MD5 checksums for recompilation checking (fixes #1372, #1959)

Isaac Dupree isaacdupree at charter.net
Wed May 28 09:20:03 EDT 2008


I guess this change is orthogonal to #835 
http://hackage.haskell.org/trac/ghc/ticket/835 , which involves what 
information goes into interface-files in the first place (rather than 
fixing it or making it worse)?

Simon Marlow wrote:
> Wed May 28 05:52:58 PDT 2008  Simon Marlow <marlowsd at gmail.com>
>   * Use MD5 checksums for recompilation checking (fixes #1372, #1959)
>   
>   This is a much more robust way to do recompilation checking.  The idea
>   is to create a fingerprint of the ABI of an interface, and track
>   dependencies by recording the fingerprints of ABIs that a module
>   depends on.  If any of those ABIs have changed, then we need to
>   recompile.
>   
>   In bug #1372 we weren't recording dependencies on package modules,
>   this patch fixes that by recording fingerprints of package modules
>   that we depend on.  Within a package there is still fine-grained
>   recompilation avoidance as before.
>   
>   We currently use MD5 for fingerprints, being a good compromise between
>   efficiency and security.  We're not worried about attackers, but we
>   are worried about accidental collisions.
>   
>   All the MD5 sums do make interface files a bit bigger, but compile
>   times on the whole are about the same as before.  Recompilation
>   avoidance should be a bit more accurate than in 6.8.2 due to fixing
>   #1959, especially when using -O.
> 
>     M ./compiler/Makefile -1 +1
>     M ./compiler/basicTypes/Module.lhs -3 +19
>     M ./compiler/basicTypes/Name.lhs -17 +3
>     M ./compiler/basicTypes/OccName.lhs +1
>     M ./compiler/coreSyn/CoreLint.lhs +11
>     M ./compiler/ghci/InteractiveUI.hs -1 +2
>     M ./compiler/iface/BinIface.hs -30 +102
>     M ./compiler/iface/IfaceSyn.lhs -362 +101
>     M ./compiler/iface/LoadIface.lhs -27 +21
>     M ./compiler/iface/MkIface.lhs -439 +534
>     M ./compiler/main/HscMain.lhs -3 +4
>     M ./compiler/main/HscTypes.lhs -52 +59
>     M ./compiler/main/TidyPgm.lhs -1 +1
>     M ./compiler/rename/RnNames.lhs -3 +3
>     M ./compiler/simplCore/OccurAnal.lhs -3 +6
>     M ./compiler/simplCore/SimplUtils.lhs +4
>     M ./compiler/typecheck/TcRnDriver.lhs -11 +114
>     M ./compiler/typecheck/TcRnTypes.lhs -5 +2
>     M ./compiler/types/Type.lhs -1 +4
>     M ./compiler/utils/Binary.hs -60 +61
>     M ./compiler/utils/FastMutInt.lhs -1 +41
>     A ./compiler/utils/Fingerprint.hsc
>     A ./compiler/utils/md5.c
>     A ./compiler/utils/md5.h
>     M ./utils/hsc2hs/Makefile +8
> 
> View patch online:
> http://darcs.haskell.org/ghc/_darcs/patches/20080528125258-12142-86f70dd9e977d96ca433fd15adb4c752b0e2dc80.gz
> 
> _______________________________________________
> Cvs-ghc mailing list
> Cvs-ghc at haskell.org
> http://www.haskell.org/mailman/listinfo/cvs-ghc
> 



More information about the Cvs-ghc mailing list