diff options
author | David Eichmann <EichmannD@gmail.com> | 2019-07-03 11:25:11 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-07-08 07:07:10 -0400 |
commit | 03f5adcd62fb1c6676f8b9e77723bac514ac8e9d (patch) | |
tree | aa0845ed4a7138aa92164e2f5fe9c8a82604a350 | |
parent | 2fd1ed541ae55a30ef65e18dc09bba993f37c70e (diff) | |
download | haskell-03f5adcd62fb1c6676f8b9e77723bac514ac8e9d.tar.gz |
Bump Shake and copy instead of hard link from cloud cache
This is important as in hard link mode shake makes all such files
read only to avoid accidentally modifying cache files via the
hard link. It turns out, many Hadrian rules attempt read access
to such files and hence fail in the hard link mode. These
rules could be refactored to avoid write access, but using
copy instead of hard link a much simpler solution.
-rw-r--r-- | hadrian/hadrian.cabal | 2 | ||||
-rw-r--r-- | hadrian/src/Main.hs | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/hadrian/hadrian.cabal b/hadrian/hadrian.cabal index e895334bae..1e7287cb92 100644 --- a/hadrian/hadrian.cabal +++ b/hadrian/hadrian.cabal @@ -128,7 +128,7 @@ executable hadrian , mtl == 2.2.* , parsec >= 3.1 && < 3.2 , QuickCheck >= 2.6 && < 2.13 - , shake >= 0.17.6 + , shake >= 0.18.3 , transformers >= 0.4 && < 0.6 , unordered-containers >= 0.2.1 && < 0.3 build-tools: alex >= 3.1 diff --git a/hadrian/src/Main.hs b/hadrian/src/Main.hs index 34e2afe23e..63001fe53b 100644 --- a/hadrian/src/Main.hs +++ b/hadrian/src/Main.hs @@ -41,6 +41,16 @@ main = do , shakeTimings = True , shakeExtra = extra + -- Setting shakeSymlink to False ensures files are copied out of + -- shake's cloud cache instead of hard linked. This is important as + -- the hard link mode makes all such files read only to avoid + -- accidentally modifying cache files via the hard link. It turns + -- out, many Hadrian rules attempt read access to such files and + -- hence would in the hard link mode. These rules could be + -- refactored to avoid write access, but setting shakeSymlink to + -- False is a much simpler solution. + , shakeSymlink = False + -- Enable linting file accesses in the build dir and ghc root dir -- (cwd) when using the `--lint-fsatrace` option. , shakeLintInside = [ cwd, buildRoot ] |