Commit 28af355b authored by Edward Z. Yang's avatar Edward Z. Yang Committed by Edward Z. Yang
Browse files

Refactor Backpack data structures to be less flexible.



There were a number of fields in 'LinkedComponent' which
were "too" flexible, in that they were fully determined by
other fields in the structure.  This refactor deletes those
fields and replaces them with functions that refer to the
fields directly.

I also introduce a new type, ComponentInclude, to take
the place of tuples which were used to represent includes
(mixins) in Backpack.

There's also more documentation for lots of bits.
Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
parent 3d88a3ec
......@@ -208,6 +208,7 @@ library
Distribution.Types.BenchmarkType
Distribution.Types.BuildInfo
Distribution.Types.BuildType
Distribution.Types.ComponentInclude
Distribution.Types.Dependency
Distribution.Types.LegacyExeDependency
Distribution.Types.PkgconfigDependency
......
......@@ -38,6 +38,7 @@ import Distribution.ModuleName
import Distribution.Simple.Setup as Setup
import Distribution.Simple.LocalBuildInfo
import Distribution.Types.ComponentRequestedSpec
import Distribution.Types.ComponentInclude
import Distribution.Verbosity
import qualified Distribution.Compat.Graph as Graph
import Distribution.Compat.Graph (Graph, IsNode(..))
......@@ -334,11 +335,13 @@ mkLinkedComponentsLocalBuildInfo comp rcs = map go rcs
Left _ -> True
Right _ -> False
includes =
case rc_i rc of
Left indefc ->
indefc_includes indefc
Right instc ->
map (\(x,y) -> (DefiniteUnitId x,y)) (instc_includes instc)
map (\ci -> (ci_id ci, ci_renaming ci)) $
case rc_i rc of
Left indefc ->
indefc_includes indefc
Right instc ->
map (\ci -> ci { ci_id = DefiniteUnitId (ci_id ci) })
(instc_includes instc)
internal_deps =
filter isInternal (nodeNeighbors rc)
++ map unDefUnitId (rc_internal_build_tools rc)
......
......@@ -23,6 +23,7 @@ import Distribution.Types.LegacyExeDependency
import Distribution.Types.IncludeRenaming
import Distribution.Types.Mixin
import Distribution.Types.UnqualComponentName
import Distribution.Types.ComponentInclude
import Distribution.Package
import Distribution.PackageDescription as PD hiding (Flag)
import Distribution.Simple.Setup as Setup
......@@ -40,31 +41,42 @@ import Text.PrettyPrint
-- and the 'ComponentId's of the things it depends on.
data ConfiguredComponent
= ConfiguredComponent {
-- | Uniquely identifies a configured component.
cc_cid :: ComponentId,
-- The package this component came from.
-- | The package this component came from.
cc_pkgid :: PackageId,
-- | The fragment of syntax from the Cabal file describing this
-- component.
cc_component :: Component,
cc_public :: Bool,
-- ^ Is this the public library component of the package?
-- (THIS is what the hole instantiation applies to.)
-- | Is this the public library component of the package?
-- (If we invoke Setup with an instantiation, this is the
-- component the instantiation applies to.)
-- Note that in one-component configure mode, this is
-- always True, because any component is the "public" one.)
cc_public :: Bool,
-- | Dependencies on internal executables from @build-tools@.
cc_internal_build_tools :: [ComponentId],
-- Not resolved yet; component configuration only looks at ComponentIds.
cc_includes :: [(ComponentId, PackageId, IncludeRenaming)]
-- | The mixins of this package, including both explicit (from
-- the @mixins@ field) and implicit (from @build-depends@). Not
-- mix-in linked yet; component configuration only looks at
-- 'ComponentId's.
cc_includes :: [ComponentInclude ComponentId IncludeRenaming]
}
-- | The 'ComponentName' of a component; this uniquely identifies
-- a fragment of syntax within a specified Cabal file describing the
-- component.
cc_name :: ConfiguredComponent -> ComponentName
cc_name = componentName . cc_component
-- | Pretty-print a 'ConfiguredComponent'.
dispConfiguredComponent :: ConfiguredComponent -> Doc
dispConfiguredComponent cc =
hang (text "component" <+> disp (cc_cid cc)) 4
(vcat [ hsep $ [ text "include", disp cid, disp incl_rn ]
| (cid, _, incl_rn) <- cc_includes cc
(vcat [ hsep $ [ text "include", disp (ci_id incl), disp (ci_renaming incl) ]
| incl <- cc_includes cc
])
-- | Construct a 'ConfiguredComponent', given that the 'ComponentId'
-- and library/executable dependencies are known. The primary
-- work this does is handling implicit @backpack-include@ fields.
......@@ -98,14 +110,23 @@ mkConfiguredComponent this_pid this_cid lib_deps exe_deps component =
error $ "Mix-in refers to non-existent package " ++ display name ++
" (did you forget to add the package to build-depends?)"
Just r -> r
in (cid, pid { pkgName = name }, rns)
in ComponentInclude {
ci_id = cid,
-- TODO: Check what breaks if you remove this edit
ci_pkgid = pid { pkgName = name },
ci_renaming = rns
}
| Mixin name rns <- mixins bi ]
-- Any @build-depends@ which is not explicitly mentioned in
-- @backpack-include@ is converted into an "implicit" include.
used_explicitly = Set.fromList (map (\(cid,_,_) -> cid) explicit_includes)
used_explicitly = Set.fromList (map ci_id explicit_includes)
implicit_includes
= map (\(cid, pid) -> (cid, pid, defaultIncludeRenaming))
= map (\(cid, pid) -> ComponentInclude {
ci_id = cid,
ci_pkgid = pid,
ci_renaming = defaultIncludeRenaming
})
$ filter (flip Set.notMember used_explicitly . fst) deps
is_public = componentName component == CLibName
......
......@@ -3,6 +3,8 @@
-- | See <https://github.com/ezyang/ghc-proposals/blob/backpack/proposals/0000-backpack.rst>
module Distribution.Backpack.LinkedComponent (
LinkedComponent(..),
lc_insts,
lc_uid,
toLinkedComponent,
toLinkedComponents,
dispLinkedComponent,
......@@ -16,7 +18,6 @@ import Distribution.Compat.Prelude hiding ((<>))
import Distribution.Backpack
import Distribution.Backpack.FullUnitId
import Distribution.Backpack.ConfiguredComponent
import Distribution.Backpack.ModSubst
import Distribution.Backpack.ModuleShape
import Distribution.Backpack.ModuleScope
import Distribution.Backpack.UnifyM
......@@ -25,6 +26,7 @@ import Distribution.Utils.MapAccum
import Distribution.Types.ModuleRenaming
import Distribution.Types.IncludeRenaming
import Distribution.Types.ComponentInclude
import Distribution.Package
import Distribution.PackageDescription as PD hiding (Flag)
import Distribution.ModuleName
......@@ -41,59 +43,57 @@ import Distribution.Text
( Text(disp) )
import Text.PrettyPrint
-- | A linked component, we know how it is instantiated and thus how we are
-- going to build it.
-- | A linked component is a component that has been mix-in linked, at
-- which point we have determined how all the dependencies of the
-- component are explicitly instantiated (in the form of an OpenUnitId).
-- 'ConfiguredComponent' is mix-in linked into 'LinkedComponent', which
-- is then instantiated into 'ReadyComponent'.
data LinkedComponent
= LinkedComponent {
lc_uid :: OpenUnitId,
-- | Uniquely identifies a 'LinkedComponent'. Corresponds to
-- 'cc_cid'.
lc_cid :: ComponentId,
-- | Corresponds to 'cc_pkgid'.
lc_pkgid :: PackageId,
lc_insts :: [(ModuleName, OpenModule)],
-- | Corresponds to 'cc_component'.
lc_component :: Component,
lc_shape :: ModuleShape,
-- | Local buildTools dependencies
-- | Local @build-tools@ dependencies on executables from the
-- same executable. Corresponds to 'cc_internal_build_tools'.
lc_internal_build_tools :: [OpenUnitId],
-- | Is this the public library of a package? Corresponds to
-- 'cc_public'.
lc_public :: Bool,
lc_includes :: [(OpenUnitId, ModuleRenaming)],
-- PackageId here is a bit dodgy, but its just for
-- BC so it shouldn't matter.
lc_depends :: [(OpenUnitId, PackageId)]
-- | Corresponds to 'cc_includes', but the 'ModuleRenaming' for
-- requirements (stored in 'IncludeRenaming') has been removed,
-- as it is reflected in 'OpenUnitId'.)
lc_includes :: [ComponentInclude OpenUnitId ModuleRenaming],
-- | The module shape computed by mix-in linking. This is
-- newly computed from 'ConfiguredComponent'
lc_shape :: ModuleShape
}
-- | The 'OpenUnitId' of this component in the "default" instantiation.
-- See also 'lc_insts'. 'LinkedComponent's cannot be instantiated
-- (e.g., there is no 'ModSubst' instance for them).
lc_uid :: LinkedComponent -> OpenUnitId
lc_uid lc = IndefFullUnitId (lc_cid lc) . Map.fromList $ lc_insts lc
-- | The instantiation of 'lc_uid'; this always has the invariant
-- that it is a mapping from a module name @A@ to @<A>@ (the hole A).
lc_insts :: LinkedComponent -> [(ModuleName, OpenModule)]
lc_insts lc = [ (req, OpenModuleVar req)
| req <- Set.toList (modShapeRequires (lc_shape lc)) ]
dispLinkedComponent :: LinkedComponent -> Doc
dispLinkedComponent lc =
hang (text "unit" <+> disp (lc_uid lc)) 4 $
vcat [ text "include" <+> disp uid <+> disp prov_rn
| (uid, prov_rn) <- lc_includes lc ]
-- YARRR $+$ dispModSubst (modShapeProvides (lc_shape lc))
vcat [ text "include" <+> disp (ci_id incl) <+> disp (ci_renaming incl)
| incl <- lc_includes lc ]
$+$ dispOpenModuleSubst (modShapeProvides (lc_shape lc))
instance Package LinkedComponent where
packageId = lc_pkgid
instance ModSubst LinkedComponent where
modSubst subst lc
= lc {
lc_uid = modSubst subst (lc_uid lc),
lc_insts = modSubst subst (lc_insts lc),
lc_shape = modSubst subst (lc_shape lc),
lc_includes = map (\(uid, rns) -> (modSubst subst uid, rns)) (lc_includes lc),
lc_depends = map (\(uid, pkgid) -> (modSubst subst uid, pkgid)) (lc_depends lc)
}
{-
instance IsNode LinkedComponent where
type Key LinkedComponent = UnitId
nodeKey = lc_uid
nodeNeighbors n =
if Set.null (openUnitIdFreeHoles (lc_uid n))
then map fst (lc_depends n)
else ordNub (map (generalizeUnitId . fst) (lc_depends n))
-}
-- We can't cache these values because they need to be changed
-- when we substitute over a 'LinkedComponent'. By varying
-- these over 'UnitId', we can support old GHCs. Nice!
toLinkedComponent
:: Verbosity
-> FullDb
......@@ -125,9 +125,9 @@ toLinkedComponent verbosity db this_pid pkg_map ConfiguredComponent {
-- Take each included ComponentId and resolve it into an
-- *unlinked* unit identity. We will use unification (relying
-- on the ModuleShape) to resolve these into linked identities.
unlinked_includes :: [((OpenUnitId, ModuleShape), PackageId, IncludeRenaming)]
unlinked_includes = [ (lookupUid cid, pid, rns)
| (cid, pid, rns) <- cid_includes ]
unlinked_includes :: [ComponentInclude (OpenUnitId, ModuleShape) IncludeRenaming]
unlinked_includes = [ ComponentInclude (lookupUid cid) pid rns
| ComponentInclude cid pid rns <- cid_includes ]
lookupUid :: ComponentId -> (OpenUnitId, ModuleShape)
lookupUid cid = fromMaybe (error "linkComponent: lookupUid")
......@@ -140,8 +140,8 @@ toLinkedComponent verbosity db this_pid pkg_map ConfiguredComponent {
-- TODO: the unification monad might return errors, in which
-- case we have to deal. Use monadic bind for now.
(linked_shape0 :: ModuleScope,
linked_deps :: [(OpenUnitId, PackageId)],
linked_includes :: [(OpenUnitId, ModuleRenaming)]) <- orErr $ runUnifyM verbosity db $ do
linked_includes :: [ComponentInclude OpenUnitId ModuleRenaming])
<- orErr $ runUnifyM verbosity db $ do
-- The unification monad is implemented using mutable
-- references. Thus, we must convert our *pure* data
-- structures into mutable ones to perform unification.
......@@ -159,13 +159,16 @@ toLinkedComponent verbosity db this_pid pkg_map ConfiguredComponent {
shape_u <- foldM mixLink emptyModuleScopeU (shapes_u ++ src_reqs_u)
-- Read out all the final results by converting back
-- into a pure representation.
let convertIncludeU (uid_u, pid, rns) = do
let convertIncludeU (ComponentInclude uid_u pid rns) = do
uid <- convertUnitIdU uid_u
return ((uid, rns), (uid, pid))
return (ComponentInclude {
ci_id = uid,
ci_pkgid = pid,
ci_renaming = rns
})
shape <- convertModuleScopeU shape_u
includes_deps <- mapM convertIncludeU includes_u
let (incls, deps) = unzip includes_deps
return (shape, deps, incls)
incls <- mapM convertIncludeU includes_u
return (shape, incls)
-- linked_shape0 is almost complete, but it doesn't contain
-- the actual modules we export ourselves. Add them!
......@@ -242,17 +245,14 @@ toLinkedComponent verbosity db this_pid pkg_map ConfiguredComponent {
let final_linked_shape = ModuleShape provs (modScopeRequires linked_shape)
return $ LinkedComponent {
lc_uid = this_uid,
lc_cid = this_cid,
lc_insts = insts,
lc_pkgid = pkgid,
lc_component = component,
lc_public = is_public,
-- These must be executables
lc_internal_build_tools = map (\cid -> IndefFullUnitId cid Map.empty) btools,
lc_shape = final_linked_shape,
lc_includes = linked_includes,
lc_depends = linked_deps
lc_includes = linked_includes
}
-- Handle mix-in linking for components. In the absence of Backpack,
......
......@@ -7,6 +7,7 @@ module Distribution.Backpack.ReadyComponent (
IndefiniteComponent(..),
rc_compat_name,
rc_compat_key,
rc_depends,
dispReadyComponent,
toReadyComponents,
) where
......@@ -21,6 +22,7 @@ import Distribution.Backpack.ModuleShape
import Distribution.Types.ModuleRenaming
import Distribution.Types.Component
import Distribution.Types.ComponentInclude
import Distribution.Compat.Graph (IsNode(..))
import Distribution.ModuleName
......@@ -38,44 +40,87 @@ import qualified Data.Map as Map
import Distribution.Version
import Distribution.Text
-- | An instantiated component is simply a linked component which
-- may have a fully instantiated 'UnitId'. When we do mix-in linking,
-- we only do each component in its most general form; instantiation
-- then takes all of the fully instantiated components and recursively
-- discovers what other instantiated components we need to build
-- before we can build them.
-- | A 'ReadyComponent' is one that we can actually generate build
-- products for. We have a ready component for the typecheck-only
-- products of every indefinite package, as well as a ready component
-- for every way these packages can be fully instantiated.
--
data ReadyComponent
= ReadyComponent {
-- | The final, string 'UnitId' that will uniquely identify
-- the compilation products of this component.
rc_uid :: UnitId,
-- | The 'OpenUnitId' for this package. At the moment, this
-- is used in only one case, which is to determine if an
-- export is of a module from this library (indefinite
-- libraries record these exports as 'OpenModule');
-- 'rc_open_uid' can be conveniently used to test for
-- equality, whereas 'UnitId' cannot always be used in this
-- case.
rc_open_uid :: OpenUnitId,
-- | Corresponds to 'lc_cid'. Invariant: if 'rc_open_uid'
-- records a 'ComponentId', it coincides with this one.
rc_cid :: ComponentId,
-- | Corresponds to 'lc_pkgid'.
rc_pkgid :: PackageId,
-- | Corresponds to 'lc_component'.
rc_component :: Component,
-- | Corresponds to 'lc_internal_build_tools'.
-- Build-tools don't participate in mix-in linking.
-- (but what if they could?)
rc_internal_build_tools :: [DefUnitId],
-- | Corresponds to 'lc_public'.
rc_public :: Bool,
-- | Extra metadata depending on whether or not this is an
-- indefinite library (typechecked only) or an instantiated
-- component (can be compiled).
rc_i :: Either IndefiniteComponent InstantiatedComponent
}
-- | An 'InstantiatedComponent' is a library which is fully instantiated
-- (or, possibly, has no requirements at all.)
data InstantiatedComponent
= InstantiatedComponent {
-- | How this library was instantiated.
instc_insts :: [(ModuleName, Module)],
-- | Dependencies induced by 'instc_insts'. These are recorded
-- here because there isn't a convenient way otherwise to get
-- the 'PackageId' we need to fill 'componentPackageDeps' as needed.
instc_insts_deps :: [(UnitId, PackageId)],
-- | The modules exported/reexported by this library.
instc_provides :: Map ModuleName Module,
instc_includes :: [(DefUnitId, ModuleRenaming)]
-- | The dependencies which need to be passed to the compiler
-- to bring modules into scope. These always refer to installed
-- fully instantiated libraries.
instc_includes :: [ComponentInclude DefUnitId ModuleRenaming]
}
-- | An 'IndefiniteComponent' is a library with requirements
-- which we will typecheck only.
data IndefiniteComponent
= IndefiniteComponent {
-- | The requirements of the library.
indefc_requires :: [ModuleName],
-- | The modules exported/reexported by this library.
indefc_provides :: Map ModuleName OpenModule,
indefc_includes :: [(OpenUnitId, ModuleRenaming)]
-- | The dependencies which need to be passed to the compiler
-- to bring modules into scope. These are 'OpenUnitId' because
-- these may refer to partially instantiated libraries.
indefc_includes :: [ComponentInclude OpenUnitId ModuleRenaming]
}
data ReadyComponent
= ReadyComponent {
rc_uid :: UnitId,
rc_open_uid :: OpenUnitId,
rc_cid :: ComponentId,
rc_pkgid :: PackageId,
rc_component :: Component,
-- build-tools don't participate in mix-in linking.
-- (but what if they cold?)
rc_internal_build_tools :: [DefUnitId],
rc_public :: Bool,
-- PackageId here is a bit dodgy, but its just for
-- BC so it shouldn't matter.
rc_depends :: [(UnitId, PackageId)],
rc_i :: Either IndefiniteComponent InstantiatedComponent
}
-- | Compute the dependencies of a 'ReadyComponent' that should
-- be recorded in the @depends@ field of 'InstalledPackageInfo'.
rc_depends :: ReadyComponent -> [(UnitId, PackageId)]
rc_depends rc = ordNub $
case rc_i rc of
Left indefc ->
map (\ci -> (abstractUnitId (ci_id ci), ci_pkgid ci))
(indefc_includes indefc)
Right instc ->
map (\ci -> (unDefUnitId (ci_id ci), ci_pkgid ci))
(instc_includes instc)
++ instc_insts_deps instc
instance Package ReadyComponent where
packageId = rc_pkgid
......@@ -194,13 +239,10 @@ toReadyComponents pid_map subst0 comps
-> InstM (Maybe ReadyComponent)
instantiateComponent uid cid insts
| Just lc <- Map.lookup cid cmap = do
deps <- forM (lc_depends lc) $ \(x, y) -> do
x' <- substUnitId insts x
return (x', y)
provides <- T.mapM (substModule insts) (modShapeProvides (lc_shape lc))
includes <- forM (lc_includes lc) $ \(x, y) -> do
x' <- substUnitId insts x
return (x', y)
includes <- forM (lc_includes lc) $ \ci -> do
uid' <- substUnitId insts (ci_id ci)
return ci { ci_id = uid' }
build_tools <- mapM (substUnitId insts) (lc_internal_build_tools lc)
s <- InstM $ \s -> (s, s)
let getDep (Module dep_def_uid _)
......@@ -217,8 +259,16 @@ toReadyComponents pid_map subst0 comps
(mkVersion [0])
instc = InstantiatedComponent {
instc_insts = Map.toList insts,
instc_insts_deps = concatMap getDep (Map.elems insts),
instc_provides = provides,
instc_includes = includes
-- NB: there is no dependency on the
-- indefinite version of this instantiated package here,
-- as (1) it doesn't go in depends in the
-- IPI: it's not a run time dep, and (2)
-- we don't have to tell GHC about it, it
-- will match up the ComponentId
-- automatically
}
return $ Just ReadyComponent {
rc_uid = uid,
......@@ -228,12 +278,6 @@ toReadyComponents pid_map subst0 comps
rc_component = lc_component lc,
rc_internal_build_tools = build_tools,
rc_public = lc_public lc,
rc_depends = ordNub $
-- NB: don't put the dep on the indef
-- package here, since we DO NOT want
-- to put it in 'depends' in the IPI
map (\(x,y) -> (unDefUnitId x, y)) deps ++
concatMap getDep (Map.elems insts),
rc_i = Right instc
}
| otherwise = return Nothing
......@@ -278,12 +322,11 @@ toReadyComponents pid_map subst0 comps
return $ Just ReadyComponent {
rc_uid = uid,
rc_open_uid = lc_uid lc,
rc_cid = lc_cid lc,
rc_cid = lc_cid lc,
rc_pkgid = lc_pkgid lc,
rc_component = lc_component lc,
rc_internal_build_tools = build_tools,
rc_public = lc_public lc,
rc_depends = ordNub (map (\(x,y) -> (abstractUnitId x, y)) (lc_depends lc)),
rc_i = Left indefc
}
| otherwise = return Nothing
......
......@@ -53,6 +53,7 @@ import Distribution.Package
import Distribution.PackageDescription
import Distribution.Text
import Distribution.Types.IncludeRenaming
import Distribution.Types.ComponentInclude
import Distribution.Verbosity
import Data.STRef
......@@ -361,9 +362,13 @@ data ModuleSourceU s =
-- | Convert a 'ModuleShape' into a 'ModuleScopeU', so we can do
-- unification on it.
convertInclude
:: ((OpenUnitId, ModuleShape), PackageId, IncludeRenaming)
-> UnifyM s (ModuleScopeU s, (UnitIdU s, PackageId, ModuleRenaming))
convertInclude ((uid, ModuleShape provs reqs), pid, incl@(IncludeRenaming prov_rns req_rns)) = do
:: ComponentInclude (OpenUnitId, ModuleShape) IncludeRenaming
-> UnifyM s (ModuleScopeU s, ComponentInclude (UnitIdU s) ModuleRenaming)
convertInclude (ComponentInclude {
ci_id = (uid, ModuleShape provs reqs),
ci_pkgid = pid,
ci_renaming = incl@(IncludeRenaming prov_rns req_rns)
}) = do
let pn = packageName pid
-- Suppose our package has two requirements A and B, and
......@@ -467,7 +472,7 @@ convertInclude ((uid, ModuleShape provs reqs), pid, incl@(IncludeRenaming prov_r
provs_u <- convertModuleProvides prov_scope
return ((provs_u, reqs_u), (uid_u, pid, prov_rns'))
return ((provs_u, reqs_u), ComponentInclude uid_u pid prov_rns')
-- | Convert a 'ModuleScopeU' to a 'ModuleScope'.
convertModuleScopeU :: ModuleScopeU s -> UnifyM s ModuleScope
......
module Distribution.Types.ComponentInclude (
ComponentInclude(..)
) where
import Distribution.Package
-- Once ci_id is refined to an 'OpenUnitId' or 'DefUnitId',
-- the 'includeRequiresRn' is not so useful (because it
-- includes the requirements renaming that is no longer
-- needed); use 'ci_prov_renaming' instead.
data ComponentInclude id rn = ComponentInclude {
ci_id :: id,
ci_pkgid :: PackageId,
ci_renaming :: rn
}
......@@ -124,6 +124,7 @@ import Distribution.Backpack.ComponentsGraph
import Distribution.Backpack.ModuleShape
import Distribution.Backpack.FullUnitId
import Distribution.Backpack
import Distribution.Types.ComponentInclude
import Distribution.Simple.Utils hiding (matchFileGlob)
import Distribution.Version
......@@ -1208,9 +1209,9 @@ elaborateInstallPlan verbosity platform compiler compilerprogdb pkgConfigDB
elabComponentId = lc_cid lc,
elabLinkedInstantiatedWith = Map.fromList (lc_insts lc),
elabPkgOrComp = ElabComponent $ elab_comp {
compLinkedLibDependencies = map fst (lc_depends lc),
compLinkedLibDependencies = ordNub (map ci_id (lc_includes lc)),
compNonSetupDependencies =
ordNub (map (abstractUnitId . fst) (lc_depends lc))
ordNub (map (abstractUnitId . ci_id) (lc_includes lc))
}
}
inplace_bin_dir
......@@ -1263,7 +1264,7 @@ elaborateInstallPlan verbosity platform compiler compilerprogdb pkgConfigDB
-- 'elab'.
compLibDependencies =
-- concatMap (elaborateLibSolverId mapDep) external_lib_dep_sids
ordNub (map (\(dep_cid, dep_pid, _) -> ConfiguredId dep_pid dep_cid) (cc_includes cc))
ordNub (map (\ci -> ConfiguredId (ci_pkgid ci) (ci_id ci)) (cc_includes cc))
compExeDependencies =
map confInstId
(concatMap (elaborateExeSolverId mapDep) external_exe_dep_sids) ++
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment