Hi again Simon,

While `stack dot --external --depth 0` gets the job done, I had a little play around with the idea of finding the initial nodes on the implicit dependency graph, rather than a traversal from the initial dependency list, and the results for this project are quite a bit shorter:

lyndon@endpin  master ✔ ~/Silverpond/promise_backend stack dot --external | grep -v PromiseBackend | stack-minimal-dependencies-exe
Right (fromList [Node "StringId \"errors\""
                        ,Node "StringId \"snap\""
                        ,Node "StringId \"wreq\""])

lyndon@endpin  master ✔ ~/Silverpond/promise_backend stack dot --external --depth=0
strict digraph deps {
"PromiseBackend" [style=dashed];
"PromiseBackend" -> "aeson";
"PromiseBackend" -> "base";
"PromiseBackend" -> "bytestring";
"PromiseBackend" -> "containers";
"PromiseBackend" -> "errors";
"PromiseBackend" -> "lens";
"PromiseBackend" -> "lens-aeson";
"PromiseBackend" -> "mtl";
"PromiseBackend" -> "snap";
"PromiseBackend" -> "text";
"PromiseBackend" -> "transformers";
"PromiseBackend" -> "unordered-containers";
"PromiseBackend" -> "wreq";
}


Not that it really matters, but thought it might be interesting for anyone who was following this thread.

The code I used to compute this is awful, and lives here: 

https://github.com/sordina/stack-minimal-dependencies/blob/master/app/Main.hs

:)


Later!

 - Lyndon

On Thu, Feb 25, 2016 at 10:58 AM, Lyndon Maydwell <maydwell@gmail.com> wrote:
Hi Simon,


stack dot --external --depth 0


That's exactly what I was first looking for!

Cheers :)


 - Lyndon

On Thu, Feb 25, 2016 at 9:55 AM, Simon Jakobi <simon.jakobi@googlemail.com> wrote:
Hi Lyndon,

I'd like to see some kind of tree instead, so that when I pre-install the dependencies, I can specify a minimal list, rather than a whole slew of dependencies that would be pulled in transitively anyway.

There's "stack list-dependencies" but that includes the transitive dependencies.

You can get the dependency tree (or rather dependency graph) with "stack dot --external"

"stack dot --external --depth 0" will show only the direct dependencies of your project.


Cheers,
Simon



_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners