[Haskell-beginners] How to deal with library dependencies?
lbolla at gmail.com
Thu Apr 26 18:42:37 CEST 2012
I've recently installed the latest yesod-platform with cabal and now I'd
like to install yesod-markdown, too.
Problem is, yesod-markdown refuses to install because it depends on
libraries older than the ones installed by yesod-platform on my system:
for example, yesod-markdown requires 0.4 <= blaze-html < 0.5, but latest
yesod-platform depends on blaze-html 0.5.0.
This problem is obviously more general, and so is my question: How to
handle packages that depend of different versions of the same library?
Would you just install the "highest common version" across all the
packages that depend on it? What if it doesn't exist?
Would you manually patch the cabal files for all the packages in the
dependency tree, hoping that newest libraries are backward compatible?
Would you wait for the library developers to update their cabal file
every time a library they rely upon changes?
To me, it looks like dependencies in .cabal files are usually too
strict. Or, packages should agree on the meaning of "minor" version
numbers. For example, if blaze-html's API did not change from 0.4 to 0.5
(supposing that API changes are identified by a change in the major
version number), then there is no point in the libraries that depend on
it to require a dependency <0.5.
Is this rule of minor/major version numbers followed/agreed upon in
More information about the Beginners