[commit: Cabal] master: Fix withComponentsLBI and move Components to LocalBuildInfo module (4367e87)
Ian Lynagh
igloo at earth.li
Fri Jul 8 15:25:31 CEST 2011
Repository : ssh://darcs.haskell.org//srv/darcs/packages/Cabal
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/4367e87852612df61c9745e96a2d3ea6e89ce9fa
>---------------------------------------------------------------
commit 4367e87852612df61c9745e96a2d3ea6e89ce9fa
Author: Duncan Coutts <duncan at community.haskell.org>
Date: Fri Jul 8 01:21:22 2011 +0000
Fix withComponentsLBI and move Components to LocalBuildInfo module
An annoyance of the current Simple build system is that each phase
(build, install, etc) can be passed additional HookedBuildInfo which
gets merged into the PackageDescription. This means that we cannot
process the PackageDescription up front at configure time and just
store and reuse it later, we have to work from it each time afresh.
The recent addition of Components (libs, exes, test suites) and a
topoligical sort of the components in the LocalBuildInfo fell foul
of this annoyance. The LocalBuildInfo stored the entire component
which meant they were not updated with the HookedBuildInfo. This
broke packages with custom Setup.hs scripts that took advantage of
the HookedBuildInfo feature, including those with configure scripts.
The solution is to store not the list of whole components but the
list of component names. Then withComponentsLBI retrieves the actual
components from the PackageDescription which thus includes the
HookedBuildInfo.
Also moved the Components into an internal module because (for the
moment at least) it is part of the Simple build system, not part of
the package description.
cabal/Distribution/PackageDescription.hs | 49 ++-------
cabal/Distribution/Simple/Build.hs | 8 +-
cabal/Distribution/Simple/Configure.hs | 15 ++-
cabal/Distribution/Simple/Haddock.hs | 8 +-
cabal/Distribution/Simple/LocalBuildInfo.hs | 158 ++++++++++++++++++--------
cabal/Distribution/Simple/PreProcess.hs | 8 +-
cabal/Distribution/Simple/SrcDist.hs | 2 +-
7 files changed, 141 insertions(+), 107 deletions(-)
Diff suppressed because of size. To see it, use:
git show 4367e87852612df61c9745e96a2d3ea6e89ce9fa
More information about the Cvs-libraries
mailing list