[Haskell-cafe] Why is this package being compiled

Henning Thielemann lemming at henning-thielemann.de
Sun Mar 13 15:12:55 UTC 2022


On Sun, 13 Mar 2022, Henry Laxen wrote:

> Dear Haskell friends,
>
> Is there a way to discover why a certain package is being compiled?  In my
> case, the package cryptonite is a dependency of some other package, but I
> don't know which one.  cryptonite doesn't compile on GHC 9.2.2, so if I can
> find out which package is causing it to be selected, perhaps I can work around
> my code so it (my code) does not depend on that package.  I hope I am making
> myself clear.  Any pointers would be appreciated.

If you manage to forbid Cabal to compile 'cryptonite' it will tell you, 
why it is required, i.e. which package directly depends on 'cryptonite'. 
--constraint="cryptonite installed" or --constraint="cryptonite>=1000000" 
should provoke an according message.

Yes, just tested it in an example project and got:

...
[__8] next goal: cryptonite (dependency of http-client-tls)
[__8] rejecting: cryptonite-0.29, cryptonite-0.28, cryptonite-0.27,
...


More information about the Haskell-Cafe mailing list