Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to handle feature requests that add new package dependencies
    primarykey
    data
    text
    <p>I am the maintainer of a package on hackage, <a href="http://hackage.haskell.org/package/lrucache" rel="nofollow">lrucache</a>. I recently received a feature request for adding instances for <code>Binary</code> and <code>NFData</code>. Both of those are useful things to have, and I have no issue with those instances, in principle.</p> <p>However, both of them introduce new package dependencies, and I want to keep my package's dependency list as minimal as possible. Is there a sane way to handle this? There are probably well over twenty different packages that provide useful type classes the data structures in <code>lrucache</code> could implement, and get some benefit from.</p> <p>Obviously, adding all of them as dependencies is a non-starter. But what else can be done?</p> <p>I can add flags to lrucache.cabal that will enable compiling various instances. That works, in terms of making the dependency list minimal, except when you want it. But it's horrible in the real world, because you can't specify build flags in build-depends sections. So you can depend on a package with a particular flag, but not specify that dependency. This quickly reduces to near-uselessness.</p> <p>I can create a bunch of orphan instance packages. This has the advantage of allowing dependencies on those instances to be specified in a build-depends section. Its main disadvantage is adding a ton of extra packages to hackage, and needing to maintain them as separate packages.</p> <p>What else can I do? What's the right thing to do?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload