[Haskell-beginners] How to deal with library dependencies?
tim.v2.0 at gmail.com
Thu Apr 26 19:02:18 CEST 2012
I believe there is a post on this from the Yesod developers:
It looks like the suggest using a better wrapper around cabal and making
virtual play-spaces to install into. I confess, I haven't taken the time to
learn it, but it sounds like they have thought through this a couple times.
On Thu, Apr 26, 2012 at 9:42 AM, Lorenzo Bolla <lbolla at gmail.com> wrote:
> Hi all,
> 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
> Haskell libraries?
> Lorenzo Bolla
> Beginners mailing list
> Beginners at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Beginners