Hadrian: disable cloud build cache for symlinks #16800
authorDavid Eichmann <EichmannD@gmail.com>
Thu, 27 Jun 2019 10:11:28 +0000 (11:11 +0100)
committerMarge Bot <ben+marge-bot@smart-cactus.org>
Tue, 2 Jul 2019 20:20:36 +0000 (16:20 -0400)
This is a temporary workaround shake not supporting symlinks
when using cloud/cached builds.

hadrian/src/Hadrian/Utilities.hs

index c934fa2..4a40611 100644 (file)
@@ -305,6 +305,10 @@ isGeneratedSource file = buildRoot <&> (`isPrefixOf` file)
 -- missing.
 createFileLink :: FilePath -> FilePath -> Action ()
 createFileLink linkTarget link = do
+    -- TODO `disableHistory` is a temporary fix (see issue #16866). Remove
+    -- `disableHistory` when shake issue is fixed: https://github.com/ndmitchell/shake/issues/683.
+    historyDisable
+
     let source = if isAbsolute linkTarget
                     then linkTarget
                     else takeDirectory link -/- linkTarget