I made a mistake during the recent refactoring work and was using the dependency planner in the wrong way. The planner was being given the available source packages and duely picking them to satisfy dependencies, but for configure we're supposed to assume that all dependencies are installed already.
Should fix ticket #796
… version Previously when multiple instances of the same package are installed, e.g. in global and user dbs, we would often end up selecting the wrong instance. Now we select the user one consistently which will solve the problem in most (but not all) cases.
For several commands, including install the -v verbosity level had far too much useless internall stuff in it. Reduced the amount of output from configuring the compiler, getting installed package and the dependency planner. The extra detail is still available via -v3.
Also minor tweak to InstallPlan.remove
Helps to clarify things now that different kinds of packages are fetched in different ways.
…tion Allows shorter and clearer code for the various ways the resolver is used.
The new user target system requires a change in how cabal info works. Instead of just giving package names and looking them up in the available package index, we can now specify names with versions or version constraints which means we want the info to be about that version in particular. We now list many installed and available versions and mark which ones are preferred or not. Also fix a bug for packages that are only installed, not available.
This will allow us to increase the range of targets that cabal commands can support. The new ones are local directory targets, local cabal files, local tarballs and remote tarballs by URL. Also a better way of doing the special "world" target.
So we can now use PackageLocation FilePath or Maybe FilePath to describe what we know about the fetch status of package tarballs.
Currently just a renamed copy of UnresolvedDependency but called WorldPkgInfo and defined in the World module. This is in preparation to remove all other uses of the UnresolvedDependency type.
We can just use "." instead of Nothing