`install --lib` tries to build all components in a package
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
```console
$ cabal install --dry --package-env . --lib pretty-simple-4.1.1.0
Resolving dependencies...
Build profile: -w ghc-9.4.5 -O1
In order, the following would be built (use -v for more details):
- pretty-simple-4.1.1.0 (lib:pretty-simple, exe:pretty-simple) (requires build)
```
The executable is not a requirement, and shouldn't need to be built. If I try explicitly requesting the library with `lib:pretty-simple`, I see curl port number errors similarly to #9074.
And it's not just executables. I've also seen Cabal similarly trying to build all libraries in a package where some libraries aren't actually depended on by the requested library (for the record, this involved [this branch](https://github.com/georgefst/sbv/tree/cross-2) via `source-repository-package`).
Contributor guide
Assessment
This issue has not been assessed yet.