GNU bug report logs - #30711
[PATCH 1/1] guix: graph: Add Trival Graph Format (TGF) backend.

Previous Next

Package: guix-patches;

Reported by: Hartmut Goebel <h.goebel <at> crazy-compilers.com>

Date: Mon, 5 Mar 2018 11:42:02 UTC

Severity: normal

Tags: patch

Done: Hartmut Goebel <h.goebel <at> crazy-compilers.com>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 30711 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Hartmut Goebel <h.goebel <at> crazy-compilers.com>
Cc: 30711 <at> debbugs.gnu.org
Subject: Re: [bug#30711] [PATCH 1/1] guix: graph: Add Trival Graph Format
 (TGF) backend.
Date: Mon, 05 Mar 2018 18:17:04 +0100
Hi Hartmut,

Hartmut Goebel <h.goebel <at> crazy-compilers.com> skribis:

> * guix/graph.scm ((emit-edge, emit-d3js-edge, emit-cypher-edge): New arguments
>   label1 , label2.
>   (emit-tg-progloug, mit-tgf-epilouge, emit-tgf-node, emit-tgf-edge): New
>   variables.
>   (%trivial-graph-backend): New variable.
>   (%graph-backends): Add %trivial-graph-backend.
>   (export-graph): Pass labels to emit-edge.

Can you tell us more about the Trivial Graph Format?

> -(define (emit-edge id1 id2 port)
> +(define (emit-edge id1 label1 id2 label2 port)
>    (format port "  \"~a\" -> \"~a\" [color = ~a];~%"
>            id1 id2 (pop-color id1)))

This is orthogonal to adding a new format, so it should probably be a
separate patch.

> +(define (emit-tgf-edge id1 label1 id2 label2 port)
> +  (format port "~a ~a~%" label1 label2))

This is probably incorrect because labels do not necessarily uniquely
identify nodes.  This is why the API distinguishes node identifiers and
labels.

Thanks,
Ludo’.




This bug report was last modified 7 years and 130 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.