Skip to content
  • Edward Z. Yang's avatar
    Don't solve for executables in legacy code path. · 9e99b3f4
    Edward Z. Yang authored
    
    
    There is a bug in `cabal configure`'s invocation of the solver in
    Distribution/Client/Configure.hs:
    
        standardInstallPolicy
            installedPkgIndex
            (SourcePackageDb mempty packagePrefs)
            [SpecificSourcePackage localPkg]
    
    We can see that the solver is given an EMPTY source package database.
    This is because we assume that everything you need from cabal configure
    is taken from the installed package index.
    
    But this is NOT true for executables, which never have an entry in the
    installed package index. So we SHOULD NOT solve for
    executables in the legacy codepath, since there isn't anything useful we
    can do with the info anyway.  This gets toggled using a new solver
    parameter SolveExecutables.
    
    I didn't bother with a test because this will be obsoleted by
    nix-local-build.
    
    Fixes #3875
    
    Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
    9e99b3f4