Be more explicit about what dependencies are solved for and what is going to be built
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
[edit: This issue turns out to be mostly due to some UI confusion. I'll keep the original description below, but I think it boils down to one relatively simple suggestion:]
Currently the first line of output when (new-)building is the rather plain
~~~~
Resolving dependencies..
~~~~
To clarify things a bit, I propose to change this to something like
~~~~
Resolving dependencies for all packages of the project (local_package_1, local_package_2, local_package_3)
~~~~
or
~~~~
Resolving dependencies for the implicit project containing just package_in_current_dir
~~~~
Another option would be to keep the first line this brief, but to append all relevant information if a dependency-resolution error occured
~~~~
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: mypackage-1.0.0.0 (user goal)
[__1] next goal: base (dependency of mypackage)
[__1] rejecting: base-4.10.1.0/installed-4.1... (conflict: mypackage =>
base>=4.9 && <4.9)
[..snip..]
when resolving the dependencies for the packages in the current project
containing the packages: mypackage, local_package_1, local_package_2, local_package_3
from the project file cabal.project.mysetup
[or]
from an implicit project
~~~~
----
(original issue description)
> With a project setup like:
>
> ~~~~
> a/a.cabal
> a/b/b.cabal
> a/c/c.cabal
> a/cabal.project
> ~~~~
>
> where cabal.project has
>
> ~~~~
> packages: . b c
> ~~~~
>
> I seem unable to select a specific target and not build the other local packages. For example, if I do this:
>
> ~~~~
> > cd a/b
> > cabal new-build lib:b --constraint='a<0' --constraint='c<0'
> ~~~~
>
> I run into an error because cabal for some reason makes a, b, and c "user goals"/"targets". This seems to be reproducable on empty/default-init'ialized projects. This is on
>
> ~~~~
> > cabal --version
> cabal-install version 2.2.0.0
> compiled using version 2.2.0.1 of the Cabal library
> ~~~~
>
>
> On a related note, I would like to stress (again) that I think it would be very useful if cabal would be more verbose/explicit about what it takes as input, how it interprets that input and why it does the things that it does. In this case I have to turn on `-v3` to get this line "targets: aaa, bbb, ccc" which still does not explain at all where these targets come from.. and on -v3 this is hidden in quite some amount of other dumps.
Contributor guide
Assessment
This issue has not been assessed yet.