Skip to content

Commit

Permalink
Fix incorrect assertion on Windows build plan shadowing
Browse files Browse the repository at this point in the history
  • Loading branch information
snoyberg committed Jun 24, 2015
1 parent 0455fcf commit b09cd42
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Stack/BuildPlan.hs
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,15 @@ shadowMiniBuildPlan (MiniBuildPlan ghc pkgs0) shadowed =
Just x -> return x
Nothing ->
case Map.lookup name pkgs1 of
Nothing -> assert (name `Set.member` shadowed) (return False)
Nothing
| name `Set.member` shadowed -> return False

-- In this case, we have to assume that we're
-- constructing a build plan on a different OS or
-- architecture, and therefore different packages
-- are being chosen. The common example of this is
-- the Win32 package.
| otherwise -> return True
Just mpi -> do
let visited' = Set.insert name visited
ress <- mapM (check visited') (Set.toList $ mpiPackageDeps mpi)
Expand Down

0 comments on commit b09cd42

Please sign in to comment.