Why is this package being compiled

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. Best wishes, Nadine and Henry Laxen The rest is silence

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, ...

I would use cabal-plan: https://hackage.haskell.org/package/cabal-plan https://hackage.haskell.org/package/cabal-plan there’s a subcommand, cabal-plan dot, which produces output suitable for graphviz: https://graphviz.org https://graphviz.org/ Cheers, Vanessa McHale
On Mar 13, 2022, at 7:10 AM, 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. Best wishes, Nadine and Henry Laxen The rest is silence _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

I second cabal-plan, but I am suggesting in particular the PR https://github.com/haskell-hvr/cabal-plan/pull/53 which features the sub-command `why-depends` pruning the dependency tree to show you exactly why you depend on a certain package. (Trying to raise some awareness for that PR as I want it to be merged) Best regards, Fendor On 13/03/2022 18:31, Vanessa McHale wrote:
I would use cabal-plan: https://hackage.haskell.org/package/cabal-plan
there’s a subcommand, cabal-plan dot, which produces output suitable for graphviz: https://graphviz.org
Cheers, Vanessa McHale
On Mar 13, 2022, at 7:10 AM, 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. Best wishes, Nadine and Henry Laxen The rest is silence _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

Thank you Henning, Vanessa, and Fendor. I was not aware of cabal-plan. It is a great tool. Thank you for pointing me to it. I also did not think of using constraints to discover dependencies. Best wishes,, Nadine and Henry Laxen The rest is silence
participants (4)
-
Fendor
-
Henning Thielemann
-
Henry Laxen
-
Vanessa McHale