[Haskell-cafe] Re: [Haskell] ANNOUNCE: Sifflet visual programming language, release 0.1.7

Daniel Fischer daniel.is.fischer at web.de
Sat Jun 12 16:05:42 EDT 2010

On Saturday 12 June 2010 21:43:25, gdweber at iue.edu wrote:
> Thanks to all for reminding me of the Package Versioning Policy (PVP);
> I have refreshed my memory of it here:
>         http://www.haskell.org/haskellwiki/Package_versioning_policy
> The message I'm picking up from this thread is that
> In *theory* if my package works with some other package P,
> version A.B.C, and
>    a.  I'm importing the whole module P unqualified, then my cabal file
>        should say my package depends on P >= something && < A.B.(C+1).
>    b.  If I'm importing P qualified or only certain names from P,
>        then I can be more relaxed in my cabal file can say my package
>        depends on P >= something && < A.(B+1).
> In reality, eternal vigilance is required, since some packages
> may be released with new version numbers not conforming to the PVP.
> But what about *lower* bounds for package dependencies?
> I think what I tend to do is something like this.
> I'm developing my package and using P with installed
> version P == A.B.C.  So I write in my cabal file that
> it depends on P >= A.B.C.

And P < A.(B+1)
Always include upper bounds on your dependencies.
Even if it will actually work with all versions of P up to (A+5), you don't 
know that, and if it breaks with A.(B+1), the hassle will probably be worse 
than the hassle an unnecessarily restrictive upper bound gives.

> Then some time later, I get a newer version of P
> with version A'.B'.C' > A.B.C,
> and I'm not aware of any significant changes,

Test your package with the new version, and if it works, raise the upper 
bound in your .cabal file.

> so I go on declaring in my cabal file
> that my package depends on P >= A.B.C,
> even though I *might* be using new features of P
> that wouldn't work with P == A.B.C.

If you're changing the code to use new features of P, you have to raise the 
lower bound of the dependency.
If you don't use any new features, it would continue working with P-A.B.C, 
so you can leave the lower bound.

> Does anyone suggest a better way of dealing with the
> lower bound package versioning?

Give the smallest version you know your package to work with.

> Greg

More information about the Haskell-Cafe mailing list