Skip to content

Commit

Permalink
Merge pull request #197 from gren-lang/fix-use-of-cache-with-local-dep
Browse files Browse the repository at this point in the history
Ignore package cache when verifying local dependency.
  • Loading branch information
robinheghan authored Mar 6, 2023
2 parents 91191fe + afef3c6 commit 63d9a6f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions builder/src/Gren/Details.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 63d9a6f

Please sign in to comment.