• Edward Z. Yang's avatar
    More accurate "registration needed?" calculation for packages. · fc1e08e6
    Edward Z. Yang authored
    
    
    Previously, we stated that registration was needed if any build target
    was a library.  Actually, this is not enough: if we have a build target
    on an executable which in turn depends on the library, we must register
    it.
    
    To actually get this information, I had to refactor ComponentsGraph to
    return the actual *graph*, so I could do a reverse closure on it, giving
    me the set of components that actually depend on the library.  That info
    then gets plumbed through ElaboratedPackage and then used to determine
    if registration is necessary.
    
    Fixes #4450, but it's possible there is another variant of the bug
    that occurs if the executable to be built does NOT depend on the
    library.
    
    I also needed to add a new hasNewBuildCompatBootCabal helper to the
    test suite to check if we can actually build the Custom setup
    with the boot Cabal.
    
    Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
    fc1e08e6