@@ -142,7 +142,6 @@ import qualified Distribution.Solver.Types.ComponentDeps as CD
142142import Distribution.Solver.Types.ConstraintSource
143143import Distribution.Solver.Types.DependencyResolver
144144import Distribution.Solver.Types.InstalledPreference as Preference
145- import Distribution.Solver.Types.InstSolverPackage (InstSolverPackage (.. ))
146145import Distribution.Solver.Types.LabeledPackageConstraint
147146import Distribution.Solver.Types.OptionalStanza
148147import Distribution.Solver.Types.PackageConstraint
@@ -169,7 +168,6 @@ import qualified Data.Map as Map
169168import qualified Data.Set as Set
170169import Text.PrettyPrint hiding ((<>) )
171170import GHC.Stack (HasCallStack )
172- import Distribution.Client.InstallPlan (renderForest' )
173171
174172-- ------------------------------------------------------------
175173
@@ -776,7 +774,6 @@ resolveDependencies
776774 -> DepResolverParams
777775 -> Progress String String SolverInstallPlan
778776resolveDependencies toolchains pkgConfigDB installedPkgIndex params = do
779- step (showDepResolverParams finalparams)
780777 pkgs <- runSolver
781778 config
782779 toolchains
@@ -786,47 +783,7 @@ resolveDependencies toolchains pkgConfigDB installedPkgIndex params = do
786783 preferences
787784 constraints
788785 targets
789- let pkgs' = sortBy (comparing solverId) pkgs
790- step $ render $ vcat
791- [ text " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
792- , text " Solver plan"
793- , text " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
794- ]
795- for_ pkgs' $ \ pkg -> do
796- step $ render $
797- hang (pretty (solverQPN pkg) <+> text " ->" <+> pretty (solverId pkg)) 4 $ case pkg of
798- PreExisting InstSolverPackage {instSolverPkgExeDeps, instSolverPkgLibDeps} ->
799- vcat
800- [ hang (pretty comp) 2 $ vcat
801- [ vcat [ hang (text " lib-deps:" ) 2 (vcat (map pretty libDeps)) | not (null libDeps) ]
802- , vcat [ hang (text " exe-deps:" ) 2 (vcat (map pretty exeDeps)) | not (null exeDeps) ]
803- ]
804- | (comp, (libDeps, exeDeps)) <- CD. toList (CD. zip instSolverPkgLibDeps instSolverPkgExeDeps)
805- ]
806- Configured SolverPackage {solverPkgExeDeps, solverPkgLibDeps} ->
807- vcat
808- [ hang (pretty comp) 2 $ vcat
809- [ vcat [ hang (text " lib-deps:" ) 2 (vcat (map pretty libDeps)) | not (null libDeps) ]
810- , vcat [ hang (text " exe-deps:" ) 2 (vcat (map pretty exeDeps)) | not (null exeDeps) ]
811- ]
812- | (comp, (libDeps, exeDeps)) <- CD. toList (CD. zip solverPkgLibDeps solverPkgExeDeps)
813- ]
814-
815- step $ render $ vcat
816- [ text " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
817- , text " Scopes"
818- , text " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
819- , renderSolverPlanScopes pkgs'
820- ]
821-
822- step $ render $ vcat
823- [ text " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
824- , text " Dependency tree"
825- , text " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
826- , text (renderForest' (\ p -> show (pretty (solverQPN p) <+> text " ->" <+> pretty (Graph. nodeKey p))) $ Graph. fromDistinctList pkgs')
827- ]
828-
829- validateSolverResult toolchains pkgs'
786+ validateSolverResult toolchains $ sortBy (comparing solverId) pkgs
830787 where
831788 installedPkgIndex' = Staged $ \ case
832789 Build -> getStage installedPkgIndex Build
@@ -848,7 +805,7 @@ resolveDependencies toolchains pkgConfigDB installedPkgIndex params = do
848805 verbosity
849806 (PruneAfterFirstSuccess False )
850807
851- finalparams @ ( DepResolverParams
808+ DepResolverParams
852809 targets
853810 constraints
854811 prefs
@@ -869,25 +826,14 @@ resolveDependencies toolchains pkgConfigDB installedPkgIndex params = do
869826 solveExes
870827 order
871828 verbosity
872- ) =
829+ =
873830 if asBool (depResolverAllowBootLibInstalls params)
874831 then params
875832 else dontInstallNonReinstallablePackages params
876833
877834 preferences :: PackageName -> PackagePreferences
878835 preferences = interpretPackagesPreference targets defpref prefs
879836
880- renderSolverPlanScopes :: [SolverInstallPlan. SolverPlanPackage ] -> Doc
881- renderSolverPlanScopes pkgs = vcat
882- [ vcat [ (pretty pp <+> text " /" ) $+$ nest 4 (vcat (map pretty (Set. toList sids)))
883- | (pp, sids) <- Map. toList (SolverInstallPlan. qualifications g)
884- ]
885- -- , vcat [ hang (pretty key) 4 (vcat [ text "-" <+> pretty n | n <- neigh]) | (_pkg, key, neigh) <- mapG ]
886- ]
887- where
888- g = Graph. fromDistinctList pkgs
889- -- (_g', mapG, _invG) = Data.Graph.graphFromEdges [ (pkg, Graph.nodeKey pkg, Graph.nodeNeighbors pkg) | pkg <- pkgs]
890-
891837-- | Give an interpretation to the global 'PackagesPreference' as
892838-- specific per-package 'PackageVersionPreference'.
893839interpretPackagesPreference
0 commit comments