unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Leo Famulari <leo@famulari.name>
To: "Ludovic Courtès" <ludo@gnu.org>, Guix-devel <Guix-devel@gnu.org>
Subject: Re: New ‘guix graph’ command
Date: Thu, 27 Aug 2015 11:20:58 -0400	[thread overview]
Message-ID: <1440688858.937482.367675369.78298A74@webmail.messagingengine.com> (raw)
In-Reply-To: <87io8164s0.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 3605 bytes --]

Very nice! This will be much easier than my ersatz solution of making
filesystem trees by hand and then running `tree` on them.

Another tool for the visual thinkers...


On Wed, Aug 26, 2015, at 18:53, Ludovic Courtès wrote:
> Hi!
>
> Here’s a long overdue ‘guix graph’ command (documentation below.)
> Comments welcome!
>
> Ludo’.
>
>
> 5.9 Invoking ‘guix graph’
> =========================
>
> Packages and their dependencies form a “graph”, specifically a
> directed acyclic graph (DAG). It can quickly become difficult to have
> a mental model of the package DAG, so the ‘guix graph’ command is here
> to provide a visual representation of the DAG. ‘guix graph’ emits a
> DAG representation in the input format of Graphviz
> (http://www.graphviz.org/), so its output can be passed directly to
> Graphviz’s ‘dot’ command, for instance.  The general syntax is:
>
> guix graph OPTIONS PACKAGE…
>
> For example, the following command generates a PDF file representing
> the package DAG for the GNU Core Utilities, showing its build-time
> dependencies:
>
> guix graph coreutils | dot -Tpdf > dag.pdf
>
> The output looks like this:
>
>
>
> Nice little graph, no?
>
> But there’s more than one graph!  The one above is concise: it’s the
> graph of package objects, omitting implicit inputs such as GCC, libc,
> grep, etc.  It’s often useful to have such a concise graph, but
> sometimes you want to see more details.  ‘guix graph’ supports several
> types of graphs, allowing you to choose the level of details:
>
> ‘package’    This is the default type, the one we used above.  It
> shows the DAG    of package objects, excluding implicit dependencies.
> It is    concise, but filters out many details.
>
> ‘bag-emerged’    This is the package DAG, __including__
> implicit inputs.
>
> For instance, the following command:
>
> guix graph --type=bag-emerged coreutils | dot -Tpdf > dag.pdf
>
> ...  yields this bigger graph:
>
>
>
> At the bottom of the graph, we see all the implicit inputs of    GNU-BUILD-
> SYSTEM (*note ‘gnu-build-system’: Build Systems.).
>
> Now, note that the dependencies of those implicit inputs—that is,
> the “bootstrap dependencies” (*note Bootstrapping::)—are not shown
> here, for conciseness.
>
> ‘bag’    Similar to ‘bag-emerged’, but this time including all the
> bootstrap    dependencies.
>
> ‘derivations’    This is the most detailed representation: It shows
> the DAG of    derivations (*note Derivations::) and plain store items.
> Compared    to the above representation, many additional nodes are
> visible,    including builds scripts, patches, Guile modules, etc.
>
> All the above types correspond to _build-time dependencies_.  The
> following graph type represents the _run-time dependencies_:
>
> ‘references’    This is the graph of “references” of a package output,
> as returned    by ‘guix gc --references’ (*note Invoking guix gc::).
>
> If the given package output is not available in the store, ‘guix
> graph’ attempts to obtain dependency information from substitutes.
>
> The available options are the following:
>
> ‘--type=TYPE’ ‘-t TYPE’    Produce a graph output of TYPE, where TYPE
> must be one of the    values listed above.
>
> ‘--list-types’    List the supported graph types.
>
> Email had 2 attachments:


>  * coreutils-graph.png  18k (image/png)
>  * coreutils-bag-graph.png  831k (image/png)

[-- Attachment #2.1: Type: text/html, Size: 5941 bytes --]

[-- Attachment #2.2: coreutils-graph.png --]
[-- Type: image/png, Size: 13378 bytes --]

[-- Attachment #2.3: coreutils-bag-graph.png --]
[-- Type: image/png, Size: 621727 bytes --]

  parent reply	other threads:[~2015-08-27 15:21 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-26 22:53 New ‘guix graph’ command Ludovic Courtès
2015-08-27  9:25 ` Pjotr Prins
2015-08-27 10:58 ` Mathieu Lirzin
2015-08-27 11:26   ` Ludovic Courtès
2015-08-27 15:15 ` Alex Kost
2015-08-27 15:20 ` Leo Famulari [this message]
2015-08-27 15:34 ` Thompson, David
2015-08-27 20:55   ` Ludovic Courtès
2015-08-27 21:01     ` Thompson, David
2015-09-03 20:32 ` Andreas Enge
2015-09-03 20:46   ` Ludovic Courtès
2015-09-03 20:54     ` Thompson, David
2015-09-03 20:55     ` Cook, Malcolm
2015-09-04  8:13       ` Pjotr Prins
2015-09-04  9:49         ` Andreas Enge
2015-09-11  0:02 ` Cyril Roelandt
2015-09-11  7:19   ` Leo Famulari
2015-09-11 12:26   ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1440688858.937482.367675369.78298A74@webmail.messagingengine.com \
    --to=leo@famulari.name \
    --cc=Guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).