From b09cd42dbcead91f06e01119a1365af88ce8de7c Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Wed, 24 Jun 2015 04:40:28 +0300 Subject: [PATCH] Fix incorrect assertion on Windows build plan shadowing --- src/Stack/BuildPlan.hs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Stack/BuildPlan.hs b/src/Stack/BuildPlan.hs index 6cd85e4bb7..0c8bcabfb4 100644 --- a/src/Stack/BuildPlan.hs +++ b/src/Stack/BuildPlan.hs @@ -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)