Should the PVP be changed with regards to instances?

Jeremy Shaw jeremy at n-heptane.com
Wed Dec 21 18:54:55 CET 2011


On Wed, Dec 21, 2011 at 11:24 AM, wren ng thornton <wren at freegeek.org> wrote:
> Agreed with this. And with Ganesh Sittampalam: the solution to the problem
> of major version changes is automated testing/reporting, not allowing
> potentially breaking changes in minor versions.

Can you explain how this helps ?

The problem I have is that the chances of adding a new instance
breaking something is often pretty low -- possibly 0. But, bumping the
major version number requires myself and others to do a bunch of work.
Would this automated testing allow me to be sure that nothing will
break when I add an instance, and therefore allow me to only bump the
minor version number? Obviously, the only way to know is to look in
every package the depends on my library and see if it adds any
conflicting instances. Though in practice, we can really only check
the packages on hackage.

Let's say the authors of text add a new instance[1]. I can not
actually update to that new version of text until all the other
libraries I use that depend on it are updated. For a very popular
library, like text, than can take awhile. So, I am stuck with the old
version until everybody updates -- and probably all they are going to
do is bump the version range.

Let's say that there turns out there is a conflict -- some package
does create a duplicate instance. Well, I can always use the
constraints flag to stick with the older text library until that *one*
problem package is updated. Annoying -- yes, but so is the
alternative.

So, the 'automated' solution I would like to see is one where the text
authors upload a new version with a bumped major version, and then
something automated happens and I can install text plus all the other
libraries that use it with out having to wait for the authors to
update their libraries.

Alternatively, a system where libraries exported some sort of
declaration of the API they need, so that the PVP is irrelevant would
be nice too -- if such a thing could be made to work. The core issue
is, after all, that we basically have a single bit of information that
we use to declare that the API is changed. That is obviously not very
fine grained...

- jeremy

[1] I don't text actually declares any type classes -- but let's pretend it did.



More information about the Libraries mailing list