<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Dec 7, 2012 at 6:20 PM, Johan Tibell <span dir="ltr">&lt;<a href="mailto:johan.tibell@gmail.com" target="_blank">johan.tibell@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Thu, Dec 6, 2012 at 11:52 PM, Michael Snoyman &lt;<a href="mailto:michael@snoyman.com">michael@snoyman.com</a>&gt; wrote:<br>


&gt; I thought the natural response to this would be to put a lower bound on<br>
&gt; text. After all, following the PVP, there should be no problem with updating<br>
&gt; a minor version number. However, when I did so, many users of the Haskell<br>
&gt; Platform were no longer able to compile due to conflicting dependencies. The<br>
&gt; result: I had to put in some dirty conditional compilation tricks in<br>
&gt; persistent to avoid inlining `pack` when using older versions of text.<br>
<br>
I&#39;ve meant to write about this but haven&#39;t yet found time to do so.<br>
<br>
Assuming that the goal of the PVP is to make sure that a packages that<br>
previously compiled continues to compile, dependencies must be taken<br>
into account when computing package version number bumps. For example,<br>
given these packages:<br>
<br>
A-1.0<br>
B-1.0 depends on A-1.0.0.*<br>
C-1.0 depends on A-1.0.0.* and B-1.0.0.*<br>
<br>
Now assume that A-2.0 is released and B starts depending on the new<br>
version of A (without changing its own API). He now have this<br>
situation:<br>
<br>
A-1.0<br>
A-2.0<br>
B-1.?.?.? depends on A-2.0.0.*<br>
C-1.0 depends on A-1.0.0.* and B-1.0.0.*<br>
<br>
If B only bumps its patch-level version (i.e. to B-1.0.0.1), C no<br>
longer compiles (due to a version constraint failure) with B-1.0.0.1<br>
even though C&#39;s dependency on B (i.e. B-1.0.0.*) suggests that it<br>
would. If B updates it&#39;s lower bound on a dependency it must bump its<br>
own major version number.<br>
<br>
We can summarize this under the slogan &quot;versions are APIs&quot;; the<br>
versions you depend on are part of your API.<br>
<br>
Aside: Even if cabal install would backtrack and *not* use the new<br>
version of B (i.e. B-1.0.0.1) and thus be able to compile C-1.0 using<br>
the old version of B things would still be bad as C&#39;s dependency<br>
constraints would be a lie.<br>
<br>
I think the PVP policy must be changed to require that increasing<br>
lower bounds on dependencies requires an increase in the major version<br>
number.<br>
<span class="HOEnZb"><font color="#888888"><br>
-- Johan<br>
</font></span></blockquote></div><br></div><div class="gmail_extra">+1. I already try and follow this policy myself, I&#39;ve seen the lack of clarity on it lead to versioning problems in the past. If anyone is interested, I can try to dredge up the actual incidents.</div>

<div class="gmail_extra"><br></div><div class="gmail_extra">Michael</div></div>