haskell / haskell/cabal

Add fake-depends

Open
#11,053 14 comments 2 reactions 0 assignees View on GitHub
cabal-install: solver Cabal: file format type: enhancement
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

**Describe the feature request**

`fake-depends` is a field like `build-depends` which would constraint solver, but otherwise do nothing.

It's sometimes (rarely, but nevertheless) needed to add a constraint, but the dependency is not (at least directly) used anywhere. It would be great if `.cabal` format had a way to explicitly specify that.

One (bad) example is to use `fake-depends: QuickCheck` with `build-depends: tasty-quickcheck`. You can import everything through `tasty-quickcheck` re-exports, but you may need to constraint underlying `QuickCheck`. Arguably `tasty-quickcheck` shouldn't re-export anything, or at least properly version own (re)exports. But here we are.

See `export-depends` in #11052 for another semantically more precise dependency specification field.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.