Why is cabal trying to install a particular dependency?

Sometimes I want to know why installing package X will require package Y. After a lot of recursive manual inspection of .cabal files and --dry-run, I discover that X depends on A, which depends on B, which depends on C, which requires Y unless some flag is specified. Is there a way to ask cabal to tell me this?

On August 28, 2014 8:18:53 AM EDT, Peter
Sometimes I want to know why installing package X will require package Y. After a lot of recursive manual inspection of .cabal files and --dry-run, I discover that X depends on A, which depends on B, which depends on C, which requires Y unless some flag is specified.
Is there a way to ask cabal to tell me this?
Passing -v3 to cabal will cause it to emit all manner of useful (and less than useful) information. It's particularly handy when trying to identify which package is holding back a dependency. Unfortunately it can be a bit tricky to quickly parse but grep can help here. Cheers, - Ben

Passing -v3 to cabal will cause it to emit all manner of useful (and less
Ben Gamari
particularly handy when trying to identify which package is holding back a dependency.
Unfortunately it can be a bit tricky to quickly parse but grep can help here.
Not ideal, but a definite improvement on what I was doing before!

Wouldn't it make sense for cabal to provide a list-dependencies command, which can query those dependencies recursively? Gesh
participants (3)
-
Ben Gamari
-
Gesh
-
Peter