From afef3c6898ba277c35332b0f06e310958de1073c Mon Sep 17 00:00:00 2001 From: Robin Heggelund Hansen Date: Mon, 6 Mar 2023 22:39:21 +0100 Subject: [PATCH] Ignore package cache when verifying local dependency. --- builder/src/Gren/Details.hs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/builder/src/Gren/Details.hs b/builder/src/Gren/Details.hs index f96f6039..4b2c0ec9 100644 --- a/builder/src/Gren/Details.hs +++ b/builder/src/Gren/Details.hs @@ -323,10 +323,15 @@ type Dep = Either (Maybe Exit.DetailsBadDep) Artifacts verifyDep :: Env -> MVar (Map.Map Pkg.Name (MVar Dep)) -> Map.Map Pkg.Name Solver.Details -> Pkg.Name -> Solver.Details -> IO Dep -verifyDep (Env key _ _ cache) depsMVar solution pkg details@(Solver.Details vsn _ directDeps) = +verifyDep (Env key _ _ cache) depsMVar solution pkg details@(Solver.Details vsn maybeLocalPath directDeps) = do let fingerprint = Map.intersectionWith (\(Solver.Details v _ _) _ -> v) solution directDeps - maybeCache <- File.readBinary (Dirs.package cache pkg vsn "artifacts.dat") + maybeCache <- + case maybeLocalPath of + Nothing -> + File.readBinary (Dirs.package cache pkg vsn "artifacts.dat") + Just _ -> + return Nothing case maybeCache of Nothing -> build key cache depsMVar pkg details fingerprint Set.empty