[commit: ghc] wip/andrey/cached-hadrian: Enable cached builds with Hadrian (b468d9d)

git at git.haskell.org git at git.haskell.org
Fri Feb 8 17:49:35 UTC 2019


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

On branch  : wip/andrey/cached-hadrian
Link       : http://ghc.haskell.org/trac/ghc/changeset/b468d9d6f02602d76803bb5e98da9a64b94735fd/ghc

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

commit b468d9d6f02602d76803bb5e98da9a64b94735fd
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Fri Feb 8 03:19:44 2019 +0000

    Enable cached builds with Hadrian
    
    See #16295: https://ghc.haskell.org/trac/ghc/ticket/16295
    
    This commit mostly focuses on getting rid of untracked dependencies,
    which prevent Shake's new `--shared` feature from appropriately caching
    build rules.
    
    There are three different solutions to untracked dependencies:
    
    * Track them! This is the obvious and the best approach, but in some
      situations we cannot use it, for example, because a build rule creates
      files whose names are not known statically and hence cannot be
      specified as the rule's outputs.
    
    * Use Shake's `produces` to record outputs dynamically, within the rule.
    
    * Use Shake's `historyDisable` to disable caching for a particular build
      rule. We currently use this approach only for `ghc-pkg` which mutates
      the package database and the file `package.cache`.


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

b468d9d6f02602d76803bb5e98da9a64b94735fd
 hadrian/hadrian.cabal                      |   2 +-
 hadrian/src/Base.hs                        |  22 +++--
 hadrian/src/Builder.hs                     |   4 +-
 hadrian/src/Context.hs                     |  16 +---
 hadrian/src/Hadrian/Haskell/Cabal.hs       |   3 +-
 hadrian/src/Hadrian/Haskell/Cabal/Parse.hs |  50 +++++++-----
 hadrian/src/Hadrian/Haskell/Cabal/Type.hs  |  57 ++++++-------
 hadrian/src/Hadrian/Oracles/Cabal/Rules.hs |   7 +-
 hadrian/src/Oracles/ModuleFiles.hs         |   8 +-
 hadrian/src/Packages.hs                    |  23 ++++--
 hadrian/src/Rules.hs                       |   4 +-
 hadrian/src/Rules/Compile.hs               | 125 ++++++++++++-----------------
 hadrian/src/Rules/Configure.hs             |   2 +
 hadrian/src/Rules/Dependencies.hs          |  36 ++++-----
 hadrian/src/Rules/Documentation.hs         |  17 ++--
 hadrian/src/Rules/Generate.hs              |  65 +++++++--------
 hadrian/src/Rules/Gmp.hs                   |  48 ++++++-----
 hadrian/src/Rules/Libffi.hs                |  59 +++++++-------
 hadrian/src/Rules/Register.hs              |  85 +++++++++++++-------
 hadrian/src/Settings.hs                    |  14 +++-
 hadrian/src/Settings/Builders/Ghc.hs       |   4 +-
 hadrian/src/Settings/Builders/GhcPkg.hs    |   2 +-
 hadrian/src/Settings/Builders/Hsc2Hs.hs    |   4 +-
 hadrian/src/Settings/Default.hs            |   9 +--
 utils/touchy/touchy.cabal                  |   2 +-
 25 files changed, 349 insertions(+), 319 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc b468d9d6f02602d76803bb5e98da9a64b94735fd


More information about the ghc-commits mailing list