Send Beginners mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."
Today's Topics:
1. How to deal with library dependencies? (Lorenzo Bolla)
2. Re: How to deal with library dependencies? (Tim Perry)
3. Re: How to deal with library dependencies? (Brent Yorgey)
----------------------------------------------------------------------
Message: 1
Date: Thu, 26 Apr 2012 17:42:37 +0100
From: Lorenzo Bolla <[email protected]>
Subject: [Haskell-beginners] How to deal with library dependencies?
To: Haskell Beginners <[email protected]>
Message-ID: <20120426164237.GL3987@dell>
Content-Type: text/plain; charset=us-ascii
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?
Thanks,
L.
--
Lorenzo Bolla
http://lbolla.info
------------------------------
Message: 2
Date: Thu, 26 Apr 2012 10:02:18 -0700
From: Tim Perry <[email protected]>
Subject: Re: [Haskell-beginners] How to deal with library
dependencies?
To: Haskell Beginners <[email protected]>
Message-ID:
<CAFVgASWB7gOTwEH=psrieR2S2e4z+m0mKnAz=_bl38rrnuo...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
I believe there is a post on this from the Yesod developers:
http://www.yesodweb.com/blog/2012/04/cabal-meta
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.
Good luck!
Tim
On Thu, Apr 26, 2012 at 9:42 AM, Lorenzo Bolla <[email protected]> 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?
>
> Thanks,
> L.
>
> --
> Lorenzo Bolla
> http://lbolla.info
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20120426/5508422a/attachment-0001.htm>
------------------------------
Message: 3
Date: Thu, 26 Apr 2012 13:37:26 -0400
From: Brent Yorgey <[email protected]>
Subject: Re: [Haskell-beginners] How to deal with library
dependencies?
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii
On Thu, Apr 26, 2012 at 05:42:37PM +0100, Lorenzo Bolla wrote:
> Hi all,
>
> This problem is obviously more general, and so is my question: How to
> handle packages that depend of different versions of the same
> library?
There's no really good answer to this question (yet).
> 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?
One of these two is what I would usually do. Which one I would choose
depends on how badly I want the package in question and how
comfortable I am trying to manually patch the cabal file.
> To me, it looks like dependencies in .cabal files are usually too
> strict.
That's one way of looking at it; the alternative, however, would be
that dependencies are too lax, and then things might install just fine
but not work; or maybe you'd get crazy type errors instead of version
errors. Which would you rather have? Personally, I'd rather have
version errors, and let the package maintainers figure out the type
errors when they update their packages.
> 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.
Most packages do agree on this; in particular they conform to the
Package Version Policy:
http://www.haskell.org/haskellwiki/Package_versioning_policy
Among other things it says that breaking API changes are identified by
changes in the first and/or second component of the version number.
The problem is that even if the API of a package changes (thus
necessitating a bump in at least the second component of the version
number), packages that depend on it may continue to work with both the
old and new versions, if they didn't happen to use the part of the API
that changed.
-Brent
------------------------------
_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners
End of Beginners Digest, Vol 46, Issue 44
*****************************************