Skip to content

Support for adding flag constraints in Cabal files #2821

Open
@acw

Description

@acw

One of the difficulties with the current system of flags is that it places all the responsibility for getting various flags right to the end-user installing some package way down the chain. It would be nice if those of us writing libraries that only work with certain upstream flag combinations could specify flags in the Cabal file, rather than having to provide long list of flag constraints for our users to follow at the end of the process.

I'm imagining something like:

  build-depends: cryptonite >= 0.6   && < 0.8 -integer-gmp,
                 tls        >= 1.3.3 && < 1.5 -network +HaNS

and so on.

As it stands, I have to provide downstream users explicit instructions about passing --constraint="cryptonite -integer-gmp" --constraint="tls -network" --constraint="tls +HaNS", which is a pain for everyone involved.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions