How broad or narrow should the usage dependency version constraints be?

I recently uploaded a Haskell project to Hackage, but I didn't know how narrow or wide I should be using the dependency version constraints in the cabal file. Are there any guidelines for this?

+3


source to share


2 answers


There is a package version policy of the Haskell package that gives clear guidelines.



But I must add that they are not universally accepted and generate a regular heated debate, especially the top version related to dependencies.

+1


source


It really depends on your dependencies. If you're lucky, they enforce semver conventions correctly , in which case you should install your dependency with the earliest minor version your projects are running and anything after, but before the next major version.



+1


source







All Articles