Skip to content
  • Duncan Coutts's avatar
    Fix withComponentsLBI and move Components to LocalBuildInfo module · 1c20a632
    Duncan Coutts authored
    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.
    1c20a632