|
|
|
|
|
by massysett
3632 days ago
|
|
Would it be possible to do this more like GNU configure does? The software specifies what it needs, and the system looks for a version that works. How about check the Haskell code automatically to see what functions it uses? If I'm using `text`, and all I use from that package is `pack`, `unpack`, and `cons`, I shouldn't have to specify bounds. The Cabal way of doing this--specifying version bounds--creates a big maintenance burden. And even then, it does not always work. So yes, I would question the merits of having a solver that checks some version numbers that developers manually put in. That said, I lack the know-how or resources to come up with anything new, so I'm stuck using curation or a solver. Using someone else's curation winds up being much less work for me than using a solver, so that's what I do. |
|
This gets often suggested every time the version bounds topic comes up (to some degree, that's the direction backpack is going btw). But unfortunately this does not work:
Because what this argument ignores is that you get a similar problem you have with duck-typing on a different level: You assume that the same name & type-signature provides the same semantics. However, the types usually leave too much degree of freedom to provide a proper contract. And you have to find a way to encode that contract.
The best-bang-for-buck way we currently have to encode this contract is... well... the PVP! Version numbers announce the contract, while version bounds define which contract you rely on.
Unless we have a better way to solve this, there's no alternative to the PVP. Unfortunately, so far I have not heard any workable solution from PVP complainers. So that's that.