Feature request: Allow conditional targets
Open
cabal-install: solver
Cabal: cmd/build
Cabal: file format
type: enhancement
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
I'm wondering if there's a problem with this idea. I'd like to enable some executables/tests only when `--ghcjs` is used, for example. But currently this is not allowed:
```
if impl(ghcjs)
executable ...
build-depends: ...
```
How hard would it be to implement this? Are there any problems with this idea?
Contributor guide
Research direction
No files, tests, or entry points are named. Start by reviewing how Cabal handles the `if impl(ghcjs)` condition and target declarations, then determine whether conditional executables and tests have a clear supported syntax and behavior when `--ghcjs` is used.
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
- Needs clarification
- Newbie friendliness
- 25/100