`cabal build package-name` builds more than asked in multipackage project
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
I am working on the [`co-log`](https://github.com/kowainik/co-log/) project which is a multipackage project. It has the following `cabal.project` file:
```
packages:
co-log-core
co-log
co-log-polysemy
co-log-benchmark
```
I want to build only `co-log-core`, `co-log` and `co-log-polysemy` packages on Appveyor's Windows machines (as `co-log-benchmark` is using `unix` library as a dependency). The command I run:
```
cabal v2-build co-log-core co-log co-log-polysemy
```
However, it starts to build `co-log-benchmark`:
```
[__2] trying: co-log-benchmark-0.0.0.0 (user goal)
```
and obviously fails.
How could I restrict the build of a certain package with Cabal?
## Expected behaviour
Cabal builds only those packages of the multipackage project that I specified in the command.
## System information
- Operating system: Windows
- `cabal-3.0.0.0`, `ghc-8.8.1`
## Additional context
Appveyor full output: https://ci.appveyor.com/project/kowainik/co-log/builds/29774908
Corresponding `co-log` PR: https://github.com/kowainik/co-log/pull/160
Contributor guide
Assessment
This issue has not been assessed yet.