Skip to content

cabal build package-name builds more than asked in multipackage project #6468

@vrom911

Description

@vrom911

I am working on the 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: co-log/co-log#160

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions