[Haskell-cafe] How to determine correct dependency versions for a library?

Peter Simons simons at cryp.to
Fri Nov 16 18:30:51 CET 2012

Hi Tobias,

 > A build-depends: B ==2.5.* C ==3.7.* (overspecified)
 > B build-depends: C ==3.* (underspecified)
 > C
 > Everything works nice until C- appears with incompatible changes
 > that break B, but not A.
 > Now both A and B have to update their dependencies and we have now:
 > A build-depends: B ==2.5.* C >=3.7 && <3.9
 > B build-depends: C >=3 && <3.8
 > C
 > And now the following combination is still valid:
 > A
 > B (old version)
 > C
 > Bang!

thank you for contributing this insightful example.

When such a situation has arisen in the past, it's my experience that the
author of B typically releases an update to fix the issue with the latest
version of C:

  B build-depends: C >= 3.8

So that particular conflict does hardly ever occur in practice.

Note that package A would build just fine after that update of B -- if the
author of A hadn't overspecified its dependencies. As it is, however, a
new version of A has to released that changes no code, but only the Cabal

Take care,

More information about the Haskell-Cafe mailing list