Hi, folks -<div><br></div><div>I&#39;m sure we are all familiar with the phrase &quot;cabal dependency hell&quot; at this point, as the number of projects on Hackage that are intended to hack around the problem slowly grows.</div>
<div><br></div><div>I am currently undergoing a fresh visit to that unhappy realm, as I try to rebuild some of my packages to see if they work with the GHC 7.6 release candidate.</div><div><br></div><div>A substantial number of the difficulties I am encountering are related to packages specifying upper bounds on their dependencies. This is a recurrent problem, and its source lies in the recommendations of the PVP itself (problematic phrase highlighted in bold):</div>
<div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">When publishing a Cabal package, you should ensure that your dependencies in the build-depends field are accurate. This means specifying not only lower bounds, <b>but also upper bounds</b> on every dependency.</blockquote>
<div><br></div></div><div>I understand that the intention behind requiring tight upper bounds was good, but in practice this has worked out terribly, leading to depsolver failures that prevent a package from being installed, when everything goes smoothly with the upper bounds relaxed. The default response has been for a flurry of small updates to packages in which the upper bounds are loosened, thus guaranteeing that the problem will recur in a year or less. This is neither sensible, fun, nor sustainable.</div>
<div><br></div><div>In practice, when an author bumps a version of a depended-upon package, the changes are almost always either benign, or will lead to compilation failure in the depending-upon package. A benign change will obviously have no visible effect, while a compilation failure is actually <i>better</i> than a depsolver failure, because it&#39;s more informative.</div>
<div><br></div><div>This leaves the nasty-but-in-my-experience-rare case of runtime failures caused by semantic changes. In these instances, a downstream package should <i>reactively</i> add an upper bound once a problem is discovered.</div>
<div><br></div><div>I propose that the sense of the recommendation around upper bounds in the PVP be reversed: upper bounds should be specified <i>only when there is a known problem with a new version</i> of a depended-upon package.</div>