File tree 1 file changed +7
-2
lines changed
cabal-install/Distribution/Client/ProjectPlanning 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ import qualified Distribution.Solver.Types.ComponentDeps as CD
69
69
import Distribution.Solver.Types.ComponentDeps (ComponentDeps )
70
70
import Distribution.Solver.Types.OptionalStanza
71
71
import Distribution.Compat.Graph (IsNode (.. ))
72
+ import Distribution.Simple.Utils (ordNub )
72
73
73
74
import Data.Map (Map )
74
75
import Data.Set (Set )
@@ -407,8 +408,12 @@ instance HasConfiguredId ElaboratedPackage where
407
408
instance IsNode ElaboratedPackage where
408
409
type Key ElaboratedPackage = UnitId
409
410
nodeKey = installedUnitId
410
- nodeNeighbors pkg = map (SimpleUnitId . confInstId) (CD. flatDeps (pkgDependencies pkg))
411
- ++ map SimpleUnitId (CD. flatDeps (pkgExeDependencies pkg))
411
+ nodeNeighbors pkg =
412
+ -- Important not to have duplicates: otherwise InstallPlan gets
413
+ -- confused
414
+ ordNub $
415
+ map (SimpleUnitId . confInstId) (CD. flatDeps (pkgDependencies pkg))
416
+ ++ map SimpleUnitId (CD. flatDeps (pkgExeDependencies pkg))
412
417
413
418
-- | This is used in the install plan to indicate how the package will be
414
419
-- built.
You can’t perform that action at this time.
0 commit comments