Skip to content

Commit

Permalink
Fix cabal-install showing up multiple times, thanks @hvr for reporting.
Browse files Browse the repository at this point in the history
Signed-off-by: Edward Z. Yang <[email protected]>
  • Loading branch information
ezyang committed Aug 7, 2016
1 parent 6d0cd9c commit 143218e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions cabal-install/Distribution/Client/ProjectPlanning/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ import qualified Distribution.Solver.Types.ComponentDeps as CD
import Distribution.Solver.Types.ComponentDeps (ComponentDeps)
import Distribution.Solver.Types.OptionalStanza
import Distribution.Compat.Graph (IsNode(..))
import Distribution.Simple.Utils (ordNub)

import Data.Map (Map)
import Data.Set (Set)
Expand Down Expand Up @@ -407,8 +408,12 @@ instance HasConfiguredId ElaboratedPackage where
instance IsNode ElaboratedPackage where
type Key ElaboratedPackage = UnitId
nodeKey = installedUnitId
nodeNeighbors pkg = map (SimpleUnitId . confInstId) (CD.flatDeps (pkgDependencies pkg))
++ map SimpleUnitId (CD.flatDeps (pkgExeDependencies pkg))
nodeNeighbors pkg =
-- Important not to have duplicates: otherwise InstallPlan gets
-- confused
ordNub $
map (SimpleUnitId . confInstId) (CD.flatDeps (pkgDependencies pkg))
++ map SimpleUnitId (CD.flatDeps (pkgExeDependencies pkg))

-- | This is used in the install plan to indicate how the package will be
-- built.
Expand Down

0 comments on commit 143218e

Please sign in to comment.