Relaxin the PVP with regards to adding instances

Edward Kmett ekmett at
Tue Sep 11 20:11:36 CEST 2012


This simple change would dramatically decrease my workload.

I often add instances for my own classes to my own types, and the need for
a major version bump can ripple through 20+ packages and then out into 3rd
party packages.


On Thu, Sep 6, 2012 at 7:24 AM, Simon Marlow <marlowsd at> wrote:

> On 06/09/2012 01:16, Johan Tibell wrote:
>> Hi all,
>> The PVP says:
>> "A.B is known as the major version number, and C the minor version
>> number. When a package is updated, the following rules govern how the
>> version number must change relative to the previous version:
>> 1. If any entity was removed, or the types of any entities or the
>> definitions of datatypes or classes were changed, or instances were
>> added or removed, then the new A.B must be greater than the previous
>> A.B. Note that modifying imports or depending on a newer version of
>> another package may cause extra instances to be exported and thus
>> force a major version change."
>> The part about adding instances and the one about modifying imports
>> makes it hard to follow the PVP. Bumping the major version number is a
>> quite disruptive change for your users if they use upper bounds on
>> their dependencies. Minor version bumps are not nearly as disruptive
>> as you can you can depend on x.y.* as long as you only use qualified
>> imports and/or explicit import lists.
>> Assuming no one uses orphan instances, adding instances is always safe
>> because you can only add instances for types from packages you depend
>> on, which means that they can't be depending on your package in turn
>> and have defined a non-orphan instance for a type or class defined in
>> your package.
>> I suggest that the rule be changed to not require a major version bump
>> if instances are added.
> Yes, I think this is reasonable.  The client already has some obligations
> if they want to be independent of minor versions: they have to use explicit
> import lists.  So adding another obligation, no orphan instances, is
> consistent with this and shouldn't cause problems in the majority of cases.
> Cheers,
>         Simon
>  P.S. I believe the same reasoning can be applied to the import part of
>> the rule above.
>> -- Johan
>> ______________________________**_________________
>> Libraries mailing list
>> Libraries at
> ______________________________**_________________
> Libraries mailing list
> Libraries at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Libraries mailing list