`cabal new-build` should warn if it's building more than one package
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
Sometimes, the behaviour of `cabal new-build` looks pretty vague.
For instance, there is a [`cabal-helper`](https://github.com/DanielG/cabal-helper/tree/5ae1c256db3510c513d5d344922f6a1a222a116c) project.
```
>> cabal-head new-build --allow-newer
Resolving dependencies...
cabal-head: Could not resolve dependencies:
next goal: cabal-helper (user goal)
rejecting: cabal-helper-0.8.0.0, cabal-helper-0.7.3.0, cabal-helper-0.7.2.0
(constraint from user target requires ==0.7.1.0)
rejecting: cabal-helper-0.7.1.0 (constraint from user target requires
==0.6.3.1)
rejecting: cabal-helper-0.6.3.1, cabal-helper-0.6.3.0, cabal-helper-0.6.2.0,
cabal-helper-0.6.1.0, cabal-helper-0.6.0.0, cabal-helper-0.5.3.0,
cabal-helper-0.5.1.0, cabal-helper-0.5.0.0, cabal-helper-0.4.0.0,
cabal-helper-0.3.9.0, cabal-helper-0.3.8.0, cabal-helper-0.3.7.0,
cabal-helper-0.3.6.0, cabal-helper-0.3.5.0, cabal-helper-0.3.4.0,
cabal-helper-0.3.3.0, cabal-helper-0.3.2.1, cabal-helper-0.3.2.0,
cabal-helper-0.3.1.0, cabal-helper-0.3.0.0, cabal-helper-0.2.0.0,
cabal-helper-0.1.0.1, cabal-helper-0.7.0.1, cabal-helper-0.5.2.0,
cabal-helper-0.1.0.0 (constraint from user target requires ==0.7.1.0)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: cabal-helper
```
For user it might be unclear, that the reason of such a failure is that all directories with .cabal files are added, but the repo includes a hackage-metadata directory with multiple cabal files for cabal-helper.
Wouldn't it be better to aware user of all the packages that was added to build in this error?
Contributor guide
Assessment
This issue has not been assessed yet.