Hadrian: Fix untracked dependencies

Authored by snowleopard on Feb 14 2019, 8:29 AM.


Hadrian: Fix untracked dependencies

This is a preparation for Trac #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 Trac #16271: ​https://ghc.haskell.org/trac/ghc/ticket/16271

Ticket Trac #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).


Marge Bot <ben+marge-bot@smart-cactus.org>Feb 20 2019, 8:59 AM
rGHC908b4b865971: Fix two bugs in stg_ap_0_fast in profiling runtime
Marge Bot <ben+marge-bot@smart-cactus.org> committed rGHC1dad4fc27ea1: Hadrian: Fix untracked dependencies (authored by snowleopard).Feb 20 2019, 8:59 AM