[Haskell-beginners] Stack minimal dependency specification, or dependency tree output
Lyndon Maydwell
maydwell at gmail.com
Sat Feb 27 03:21:47 UTC 2016
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 at 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 at 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 at 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 at 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.
>>
>> More stack dot examples:
>> http://docs.haskellstack.org/en/stable/dependency_visualization/
>>
>> Cheers,
>> Simon
>>
>>
>>
>> _______________________________________________
>> Beginners mailing list
>> Beginners at haskell.org
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20160227/030fd2ba/attachment-0001.html>
More information about the Beginners
mailing list