Skip to content

Commit

Permalink
Fix a bug that caused important debugging info to be deleted in modul…
Browse files Browse the repository at this point in the history
…ar solver.

The question is whether or not cabal-install will tell you why it tries
a particular goal (i.e., because it's the dependency of something else).

This regression was introduced between 0.14.0 and 1.16.0 of
cabal-install in order to fix a space leak. Restoring the information
actually costs some space again (although not as much as was required
back in 0.14.0).  I think the extra info is worth it though.
  • Loading branch information
kosmikus committed Nov 15, 2012
1 parent 91e1198 commit 89d8b51
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,8 @@ avoidReinstalls p = trav go
firstGoal :: Tree a -> Tree a
firstGoal = trav go
where
go (GoalChoiceF xs) = casePSQ xs (GoalChoiceF xs) (\ _ t _ -> out t)
go (GoalChoiceF xs) = -- casePSQ xs (GoalChoiceF xs) (\ _ t _ -> out t) -- more space efficient, but removes valuable debug info
casePSQ xs (GoalChoiceF (fromList [])) (\ g t _ -> GoalChoiceF (fromList [(g, t)]))
go x = x
-- Note that we keep empty choice nodes, because they mean success.

Expand Down

0 comments on commit 89d8b51

Please sign in to comment.