[commit: ghc] wip/dwarf-bindists, wip/pare-down-ci, wip/std-hdr-llf, wip/test-hadrian-caching, wip/validate-ci, wip/zip7-fusion: Hadrian: Fix untracked dependencies (1dad4fc)

git at git.haskell.org git at git.haskell.org
Thu Feb 21 15:08:16 UTC 2019


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

On branches: wip/dwarf-bindists,wip/pare-down-ci,wip/std-hdr-llf,wip/test-hadrian-caching,wip/validate-ci,wip/zip7-fusion
Link       : http://ghc.haskell.org/trac/ghc/changeset/1dad4fc27ea128a11ba0077f459494c2a1ca0d5c/ghc

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

commit 1dad4fc27ea128a11ba0077f459494c2a1ca0d5c
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Thu Feb 14 14:29:50 2019 +0000

    Hadrian: Fix untracked dependencies
    
    This is a preparation for #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`.
    
    These two tickets are fixed as the result:
    
    Ticket #16271: ​https://ghc.haskell.org/trac/ghc/ticket/16271
    
    Ticket #16272: ​https://ghc.haskell.org/trac/ghc/ticket/16272 (this one
    is fixed only partially: we correctly record the dependency, but we
    still copy files into the RTS build tree).


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

1dad4fc27ea128a11ba0077f459494c2a1ca0d5c
 hadrian/hadrian.cabal                      |   2 +-
 hadrian/src/Base.hs                        |  22 +++--
 hadrian/src/Builder.hs                     |  14 ++--
 hadrian/src/Context.hs                     |  16 +---
 hadrian/src/Hadrian/Haskell/Cabal.hs       |   3 +-
 hadrian/src/Hadrian/Haskell/Cabal/Parse.hs |  58 ++++++++-----
 hadrian/src/Hadrian/Haskell/Cabal/Type.hs  |  57 ++++++-------
 hadrian/src/Hadrian/Oracles/Cabal/Rules.hs |   7 +-
 hadrian/src/Oracles/ModuleFiles.hs         |   9 ++-
 hadrian/src/Packages.hs                    |  33 ++++++--
 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                   |  49 +++++------
 hadrian/src/Rules/Libffi.hs                |  59 +++++++-------
 hadrian/src/Rules/Register.hs              |  90 +++++++++++++--------
 hadrian/src/Settings.hs                    |  14 +++-
 hadrian/src/Settings/Builders/Ghc.hs       |   4 +-
 hadrian/src/Settings/Builders/GhcPkg.hs    |   3 +-
 hadrian/src/Settings/Builders/Hsc2Hs.hs    |   4 +-
 hadrian/src/Settings/Default.hs            |   9 +--
 utils/touchy/touchy.cabal                  |   2 +-
 25 files changed, 369 insertions(+), 335 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 1dad4fc27ea128a11ba0077f459494c2a1ca0d5c


More information about the ghc-commits mailing list