From 48051f91df91a43b4a8984b87e27eae64f6f71f7 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Thu, 26 Jan 2017 15:21:40 -0500 Subject: [PATCH] Fix cabal-install after build-depends reform --- cabal-install/Distribution/Client/Configure.hs | 2 +- cabal-install/Distribution/Client/Install.hs | 2 +- .../Distribution/Client/ProjectPlanning.hs | 13 ++++--------- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/cabal-install/Distribution/Client/Configure.hs b/cabal-install/Distribution/Client/Configure.hs index 8d1d442aebd..67624a823d8 100644 --- a/cabal-install/Distribution/Client/Configure.hs +++ b/cabal-install/Distribution/Client/Configure.hs @@ -402,7 +402,7 @@ configurePackage verbosity platform comp scriptOptions configFlags -- depending on the Cabal version we are talking to. configConstraints = [ thisPackageVersion srcid | ConfiguredId srcid _uid <- CD.nonSetupDeps deps ], - configDependencies = [ (packageName srcid, uid) + configDependencies = [ (packageName srcid, Nothing, uid) | ConfiguredId srcid uid <- CD.nonSetupDeps deps ], -- Use '--exact-configuration' if supported. configExactConfiguration = toFlag True, diff --git a/cabal-install/Distribution/Client/Install.hs b/cabal-install/Distribution/Client/Install.hs index 9e843577d53..4238d2bed5d 100644 --- a/cabal-install/Distribution/Client/Install.hs +++ b/cabal-install/Distribution/Client/Install.hs @@ -1236,7 +1236,7 @@ installReadyPackage platform cinfo configFlags -- the Cabal version we are talking to. configConstraints = [ thisPackageVersion srcid | ConfiguredId srcid _ipid <- CD.nonSetupDeps deps ], - configDependencies = [ (packageName srcid, dep_ipid) + configDependencies = [ (packageName srcid, Nothing, dep_ipid) | ConfiguredId srcid dep_ipid <- CD.nonSetupDeps deps ], -- Use '--exact-configuration' if supported. configExactConfiguration = toFlag True, diff --git a/cabal-install/Distribution/Client/ProjectPlanning.hs b/cabal-install/Distribution/Client/ProjectPlanning.hs index 62b4b828aed..37724040d52 100644 --- a/cabal-install/Distribution/Client/ProjectPlanning.hs +++ b/cabal-install/Distribution/Client/ProjectPlanning.hs @@ -1123,7 +1123,7 @@ elaborateInstallPlan verbosity platform compiler compilerprogdb pkgConfigDB infoProgress $ hang (text "Component graph for" <+> disp pkgid <<>> colon) 4 (dispComponentsGraph g) (_, comps) <- mapAccumM buildComponent - ((Map.empty, Map.empty), Map.empty, Map.empty) + (Map.empty, Map.empty, Map.empty) (map fst g) let is_public_lib ElaboratedConfiguredPackage{..} = case elabPkgOrComp of @@ -1242,7 +1242,7 @@ elaborateInstallPlan verbosity platform compiler compilerprogdb pkgConfigDB compLinkedLibDependencies = error "buildComponent: compLinkedLibDependencies" compNonSetupDependencies = error "buildComponent: compNonSetupDependencies" - cc = toConfiguredComponent pd cid external_cc_map cc_map comp + cc = toConfiguredComponent pd cid cc_map comp cc_map' = extendConfiguredComponentMap cc cc_map cid :: ComponentId @@ -1321,7 +1321,7 @@ elaborateInstallPlan verbosity platform compiler compilerprogdb pkgConfigDB compInplaceDependencyBuildCacheFiles = concatMap (elaborateLibBuildCacheFile mapDep) external_lib_dep_sids external_exe_dep_sids = CD.select (== compSolverName) exe_deps0 - external_cc_map = Map.fromList (map mkPkgNameMapping external_lib_dep_pkgs) + external_lc_map = Map.fromList (map mkShapeMapping external_lib_dep_pkgs) unbuildable_external_lib_deps = @@ -1329,11 +1329,6 @@ elaborateInstallPlan verbosity platform compiler compilerprogdb pkgConfigDB unbuildable_external_exe_deps = filter (null . elaborateExeSolverId mapDep) external_exe_dep_sids - mkPkgNameMapping :: ElaboratedPlanPackage - -> (PackageName, (ComponentId, PackageId)) - mkPkgNameMapping dpkg = - (packageName dpkg, (getComponentId dpkg, packageId dpkg)) - mkShapeMapping :: ElaboratedPlanPackage -> (ComponentId, (OpenUnitId, ModuleShape)) mkShapeMapping dpkg = @@ -2717,7 +2712,7 @@ setupHsConfigureFlags (ReadyPackage elab@ElaboratedConfiguredPackage{..}) -- NB: This does NOT use InstallPlan.depends, which includes executable -- dependencies which should NOT be fed in here (also you don't have -- enough info anyway) - configDependencies = [ (packageName srcid, cid) + configDependencies = [ (packageName srcid, Nothing, cid) | ConfiguredId srcid cid <- elabLibDependencies elab ] configConstraints = case elabPkgOrComp of