diff options
author | David Eichmann <EichmannD@gmail.com> | 2019-03-07 17:35:09 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-04-01 03:32:34 -0400 |
commit | e468c61333205cc89244acc01432c8493cb06d62 (patch) | |
tree | d1bd2f2c03962a71625941ea98cfb733a32ab556 | |
parent | 061276ea5d265eb3c23a3698f0a10f6a764ff4b4 (diff) | |
download | haskell-e468c61333205cc89244acc01432c8493cb06d62.tar.gz |
Support Shake's --lint-fsatrace feature.
Using this feature requires fsatrace (e.g. https://github.com/jacereda/fsatrace).
Simply use the `--lint-fsatrace` option when running hadrian.
Shake version >= 0.17.7 is required to support linting out of tree build dirs.
-rw-r--r-- | hadrian/src/Main.hs | 11 | ||||
-rw-r--r-- | hadrian/stack.yaml | 6 |
2 files changed, 10 insertions, 7 deletions
diff --git a/hadrian/src/Main.hs b/hadrian/src/Main.hs index fe5dbbb937..11ee2334d9 100644 --- a/hadrian/src/Main.hs +++ b/hadrian/src/Main.hs @@ -1,5 +1,6 @@ module Main (main) where +import System.Directory (getCurrentDirectory) import Development.Shake import Hadrian.Expression import Hadrian.Utilities @@ -30,14 +31,20 @@ main = do rebuild = [ (RebuildLater, buildRoot -/- "stage0//*") | CommandLine.lookupFreeze1 argsMap ] - options :: ShakeOptions + cwd <- getCurrentDirectory + let options :: ShakeOptions options = shakeOptions { shakeChange = ChangeModtimeAndDigest , shakeFiles = buildRoot -/- Base.shakeFilesDir , shakeProgress = progressSimple , shakeRebuild = rebuild , shakeTimings = True - , shakeExtra = extra } + , shakeExtra = extra + + -- Enable linting file accesses in the build dir and ghc root dir + -- (cwd) when using the `--lint-fsatrace` option. + , shakeLintInside = [ cwd, buildRoot ] + } rules :: Rules () rules = do diff --git a/hadrian/stack.yaml b/hadrian/stack.yaml index 7f069440ad..d121892b4d 100644 --- a/hadrian/stack.yaml +++ b/hadrian/stack.yaml @@ -1,7 +1,7 @@ # For more information, see: http://docs.haskellstack.org/en/stable/yaml_configuration.html # Specifies the GHC version and set of packages available (e.g., lts-3.5, nightly-2015-09-21, ghc-7.10.2) -resolver: lts-13.6 +resolver: lts-13.14 # Local packages, usually specified by relative directory name packages: @@ -18,10 +18,6 @@ packages: # TODO: Remove this once it's no longer necessary allow-newer: true -# shake-0.17.4 and below depend on heaps, which depends on a specific Cabal -extra-deps: -- shake-0.17.5 - nix: enable: false packages: |