haskell / haskell/cabal

cabal should warn if dependency is specified multiple times

Open
#1,107 13 comments 0 reactions 0 assignees View on GitHub
Cabal: file format Cabal: other old-milestone: ⊥ type: enhancement
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

The buildbox-2.1.2.2 package has the following Build-Depends:

```
Build-Depends:
base >= 4.4 && < 4.7,
containers >= 0.4 && < 0.6,
time >= 1.2 && < 1.5,
directory >= 1.1 && < 1.3,
bytestring >= 0.9 && < 0.11,
mtl == 2.1.*,
old-locale == 1.0.*,
process == 1.1.*,
random == 1.0.*,
pretty == 1.1.*,
bytestring == 0.10.*,
stm == 2.4.*
```

Note that bytestring is defined twice. cabal should detect and reject multiple definitions of the same dependency.

**Editorial by @ezyang.** Note that, with the presence of conditionals, a particular dependency can easily show up multiple times in a Cabal file. So the request here is more for a "lint" type check for when the duplication cannot possibly help.

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.