diff --git a/hadrian/hadrian.cabal b/hadrian/hadrian.cabal index e895334baedfa063b2da4e6dc1cf55348b8b770b..1e7287cb921c2fe9aa622001e2af70a137a05863 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 34e2afe23ef2fc465be1f51a2f732aaeafa5b829..63001fe53b569267c2e81c40beb4f60ac0cf5fd2 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 ]