Skip to content
Snippets Groups Projects
Commit 9e99b3f4 authored by Edward Z. Yang's avatar Edward Z. Yang
Browse files

Don't solve for executables in legacy code path.


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>
parent da71f1c8
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment