Support for adding flag constraints in Cabal files
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
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.
Contributor guide
Research direction
The issue names no files, tests, or entry points. Start by locating Cabal file parsing and the existing --constraint handling, then determine how the proposed flag syntax should be specified and validated; done means supported constraints are accepted from Cabal files and covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100