Cabal build targets erroneously depend on package library
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
**Describe the bug**
Cabal appears to be requiring an internal package erroneously.
The following warning is reported repeatedly for many build targets:
```
: warning: [-Wunused-packages]
The following packages were specified via -package or -package-id flags,
but were not needed for compilation:
- phylogenetic-component-graph-0.3.0
```
**To Reproduce**
Steps to reproduce the behavior:
```
$ git clone https://github.com/amnh/PCG
$ cd PCG
$ git checkout 041b803c4c9e22b95f96b13dbb89e2e3515d4ff0
$ cabal v2-build
```
**Expected behavior**
No build target should depend on `phylogenetic-component-graph` as a dependency, however many build targets do tacitly depend on this package despite it not being specified in the `build-depends` stanza.
**System information**
- Ubuntu 20.04
- `cabal-3.2`, `cabal-3.4`
- `ghc-8.8.4`, `ghc-8.10.4`, `ghc-9.0.1`
**Additional context**
I think that there is some erroneous behavior with the sub-library feature.
Contributor guide
Assessment
This issue has not been assessed yet.