From unknown Mon Jun 23 23:49:25 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#27907 <27907@debbugs.gnu.org> To: bug#27907 <27907@debbugs.gnu.org> Subject: Status: [PATCH] graph: Provide access to the package record in the emit Reply-To: bug#27907 <27907@debbugs.gnu.org> Date: Tue, 24 Jun 2025 06:49:25 +0000 retitle 27907 [PATCH] graph: Provide access to the package record in the e= mit reassign 27907 guix-patches submitter 27907 Roel Janssen severity 27907 normal tag 27907 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 01 10:40:22 2017 Received: (at submit) by debbugs.gnu.org; 1 Aug 2017 14:40:22 +0000 Received: from localhost ([127.0.0.1]:37062 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dcYLO-0007Jg-G1 for submit@debbugs.gnu.org; Tue, 01 Aug 2017 10:40:22 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60723) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dcYLM-0007JT-5i for submit@debbugs.gnu.org; Tue, 01 Aug 2017 10:40:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dcYLF-0000YU-Jk for submit@debbugs.gnu.org; Tue, 01 Aug 2017 10:40:14 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:40688) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dcYLF-0000YC-Fm for submit@debbugs.gnu.org; Tue, 01 Aug 2017 10:40:13 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51647) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcYLE-0006iv-3S for guix-patches@gnu.org; Tue, 01 Aug 2017 10:40:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dcYLB-0000Uh-Dk for guix-patches@gnu.org; Tue, 01 Aug 2017 10:40:12 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:56839) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcYLB-0000UQ-9N for guix-patches@gnu.org; Tue, 01 Aug 2017 10:40:09 -0400 Received: from [143.121.198.177] (port=44040 helo=cog147) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dcYLA-00079a-Rj for guix-patches@gnu.org; Tue, 01 Aug 2017 10:40:09 -0400 User-agent: mu4e 0.9.18; emacs 25.2.1 From: Roel Janssen To: guix-patches Subject: [PATCH] graph: Provide access to the package record in the emit Date: Tue, 01 Aug 2017 16:40:05 +0200 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-graph-Provide-access-to-the-package-record-in-the-em.patch >From 0243051f4a650f729e20645606d45d7138f2aa8c Mon Sep 17 00:00:00 2001 From: Roel Janssen Date: Tue, 1 Aug 2017 16:30:02 +0200 Subject: [PATCH] graph: Provide access to the package record in the emit functions. * guix/graph.scm (export-graph): Pass the node to the emit functions, instead of the node's label. --- guix/graph.scm | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/guix/graph.scm b/guix/graph.scm index d7fd5f3..0219787 100644 --- a/guix/graph.scm +++ b/guix/graph.scm @@ -22,6 +22,7 @@ #:use-module (guix monads) #:use-module (guix records) #:use-module (guix sets) + #:use-module (guix packages) #:use-module (rnrs io ports) #:use-module (srfi srfi-1) #:use-module (srfi srfi-9) @@ -170,9 +171,9 @@ typically returned by 'node-edges' or 'node-back-edges'." name)) (define (emit-epilogue port) (display "\n}\n" port)) -(define (emit-node id label port) +(define (emit-node id node port) (format port " \"~a\" [label = \"~a\", shape = box, fontname = Helvetica];~%" - id label)) + id (package-full-name node))) (define (emit-edge id1 id2 port) (format port " \"~a\" -> \"~a\" [color = ~a];~%" id1 id2 (pop-color id1))) @@ -213,11 +214,11 @@ var nodes = {}, (format port "" (search-path %load-path "graph.js"))) -(define (emit-d3js-node id label port) +(define (emit-d3js-node id node port) (format port "\ nodes[\"~a\"] = {\"id\": \"~a\", \"label\": \"~a\", \"index\": nodeArray.length}; nodeArray.push(nodes[\"~a\"]);~%" - id id label id)) + id id (package-full-name node) id)) (define (emit-d3js-edge id1 id2 port) (format port "links.push({\"source\": \"~a\", \"target\": \"~a\"});~%" @@ -241,9 +242,9 @@ nodeArray.push(nodes[\"~a\"]);~%" (define (emit-cypher-epilogue port) (format port "")) -(define (emit-cypher-node id label port) +(define (emit-cypher-node id node port) (format port "MERGE (p:Package { id: ~s }) SET p.name = ~s;~%" - id label )) + id (package-name node))) (define (emit-cypher-edge id1 id2 port) (format port "MERGE (a:Package { id: ~s });~%" id1) @@ -296,7 +297,7 @@ true, draw reverse arrows." (ids (mapm %store-monad node-identifier dependencies))) - (emit-node id (node-label head) port) + (emit-node id head port) (for-each (lambda (dependency dependency-id) (if reverse-edges? (emit-edge dependency-id id port) -- 2.7.4 --=-=-= Content-Type: text/plain Dear Guix, I would like to expand the Cypher back-end and in the long run add a SPARQL graph back-end to GNU Guix. For this, I will need to have access to the package records inside the emit-* functions. This patch makes this change by essentially changing the "label" parameter of the emit-* functions passed as "(node-label head)" into a "node" parameter, passed as "head". The rest of the patch adapts the current emit-* functions to this change. I tested the Graphviz, D3js, and Cypher back-ends, and all seem to work as before. Is it OK to apply this change? Kind regards, Roel Janssen --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 01 15:26:01 2017 Received: (at 27907) by debbugs.gnu.org; 1 Aug 2017 19:26:01 +0000 Received: from localhost ([127.0.0.1]:37271 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dccnp-0000fU-3C for submit@debbugs.gnu.org; Tue, 01 Aug 2017 15:26:01 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39984) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dccnn-0000fJ-J8 for 27907@debbugs.gnu.org; Tue, 01 Aug 2017 15:25:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dccnf-0003vj-UK for 27907@debbugs.gnu.org; Tue, 01 Aug 2017 15:25:54 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:34213) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dccnf-0003vX-Pq for 27907@debbugs.gnu.org; Tue, 01 Aug 2017 15:25:51 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:37078 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dccnf-0004J0-2J; Tue, 01 Aug 2017 15:25:51 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Roel Janssen Subject: Re: [bug#27907] [PATCH] graph: Provide access to the package record in the emit References: X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 14 Thermidor an 225 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu Date: Tue, 01 Aug 2017 21:25:49 +0200 In-Reply-To: (Roel Janssen's message of "Tue, 01 Aug 2017 16:40:05 +0200") Message-ID: <87lgn3w0n6.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 27907 Cc: 27907@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Roel Janssen skribis: > I would like to expand the Cypher back-end and in the long run add a > SPARQL graph back-end to GNU Guix. For this, I will need to have access > to the package records inside the emit-* functions. > > This patch makes this change by essentially changing the "label" > parameter of the emit-* functions passed as "(node-label head)" into a > "node" parameter, passed as "head". > > The rest of the patch adapts the current emit-* functions to this > change. > > I tested the Graphviz, D3js, and Cypher back-ends, and all seem to work > as before. > > Is it OK to apply this change? Sure, looks good to me! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 01 18:48:15 2017 Received: (at 27907-done) by debbugs.gnu.org; 1 Aug 2017 22:48:15 +0000 Received: from localhost ([127.0.0.1]:37432 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dcfxW-00075p-R6 for submit@debbugs.gnu.org; Tue, 01 Aug 2017 18:48:15 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40114) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dcfxW-00075d-48 for 27907-done@debbugs.gnu.org; Tue, 01 Aug 2017 18:48:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dcfxP-0002vu-VE for 27907-done@debbugs.gnu.org; Tue, 01 Aug 2017 18:48:08 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37829) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcfxK-0002ot-GH; Tue, 01 Aug 2017 18:48:02 -0400 Received: from ip112-245-209-87.adsl2.static.versatel.nl ([87.209.245.112]:52131 helo=antelope) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dcfxK-0001lf-0q; Tue, 01 Aug 2017 18:48:02 -0400 References: <87lgn3w0n6.fsf@gnu.org> User-agent: mu4e 0.9.18; emacs 25.1.1 From: Roel Janssen To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [bug#27907] [PATCH] graph: Provide access to the package record in the emit Message-ID: <87vam6q50t.fsf@gnu.org> In-reply-to: <87lgn3w0n6.fsf@gnu.org> Date: Wed, 02 Aug 2017 00:47:53 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 27907-done Cc: 27907-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Ludovic Courtès writes: > Roel Janssen skribis: > >> I would like to expand the Cypher back-end and in the long run add a >> SPARQL graph back-end to GNU Guix. For this, I will need to have access >> to the package records inside the emit-* functions. >> >> This patch makes this change by essentially changing the "label" >> parameter of the emit-* functions passed as "(node-label head)" into a >> "node" parameter, passed as "head". >> >> The rest of the patch adapts the current emit-* functions to this >> change. >> >> I tested the Graphviz, D3js, and Cypher back-ends, and all seem to work >> as before. >> >> Is it OK to apply this change? > > Sure, looks good to me! > > Ludo’. Thanks! I pushed this patch. Kind regards, Roel Janssen From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 24 18:26:42 2017 Received: (at 27907) by debbugs.gnu.org; 24 Aug 2017 22:26:42 +0000 Received: from localhost ([127.0.0.1]:53309 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dl0aI-0001Tu-4s for submit@debbugs.gnu.org; Thu, 24 Aug 2017 18:26:42 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41290) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dl0aG-0001Tf-2a for 27907@debbugs.gnu.org; Thu, 24 Aug 2017 18:26:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dl0a5-0005mD-SG for 27907@debbugs.gnu.org; Thu, 24 Aug 2017 18:26:34 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:47886) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dl0a5-0005lu-On for 27907@debbugs.gnu.org; Thu, 24 Aug 2017 18:26:29 -0400 Received: from x590ce742.dyn.telefonica.de ([89.12.231.66]:46370 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dl0a4-0004Pz-RX; Thu, 24 Aug 2017 18:26:29 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Roel Janssen Subject: Re: [bug#27907] [PATCH] graph: Provide access to the package record in the emit References: <87lgn3w0n6.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 8 Fructidor an 225 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu Date: Fri, 25 Aug 2017 00:26:23 +0200 In-Reply-To: <87lgn3w0n6.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Tue, 01 Aug 2017 21:25:49 +0200") Message-ID: <87inhchab4.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 27907 Cc: 27907@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Hi! ludo@gnu.org (Ludovic Court=C3=A8s) skribis: > Roel Janssen skribis: > >> I would like to expand the Cypher back-end and in the long run add a >> SPARQL graph back-end to GNU Guix. For this, I will need to have access >> to the package records inside the emit-* functions. >> >> This patch makes this change by essentially changing the "label" >> parameter of the emit-* functions passed as "(node-label head)" into a >> "node" parameter, passed as "head". >> >> The rest of the patch adapts the current emit-* functions to this >> change. >> >> I tested the Graphviz, D3js, and Cypher back-ends, and all seem to work >> as before. >> >> Is it OK to apply this change? > > Sure, looks good to me! Actually no! :-) The problem was that it broke all non-package-related =E2=80=9Cnode types= =E2=80=9D (like =E2=80=9Cguix graph -t references=E2=80=9D), and it had the problem that it= ignores the =E2=80=98label=E2=80=99 procedure in . And =E2=80=9Cmake check= =E2=80=9D failed. So I reverted it in 5e60bef9802e448924f889d34d95a249b008652c. We need to rethink about it. Cheers, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 25 05:01:20 2017 Received: (at 27907) by debbugs.gnu.org; 25 Aug 2017 09:01:20 +0000 Received: from localhost ([127.0.0.1]:53546 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dlAUS-0001PF-FE for submit@debbugs.gnu.org; Fri, 25 Aug 2017 05:01:20 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43792) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dlAUR-0001P2-CJ for 27907@debbugs.gnu.org; Fri, 25 Aug 2017 05:01:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dlAUK-0000vT-2k for 27907@debbugs.gnu.org; Fri, 25 Aug 2017 05:01:14 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33711) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dlAUC-0000ro-9D; Fri, 25 Aug 2017 05:01:04 -0400 Received: from [143.121.198.177] (port=33438 helo=cog147) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dlAUB-0007b0-PP; Fri, 25 Aug 2017 05:01:04 -0400 References: <87lgn3w0n6.fsf@gnu.org> <87inhchab4.fsf@gnu.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Roel Janssen To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [bug#27907] [PATCH] graph: Provide access to the package record in the emit In-reply-to: <87inhchab4.fsf@gnu.org> Date: Fri, 25 Aug 2017 11:00:51 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 27907 Cc: 27907@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Ludovic Courtès writes: > Hi! > > ludo@gnu.org (Ludovic Courtès) skribis: > >> Roel Janssen skribis: >> >>> I would like to expand the Cypher back-end and in the long run add a >>> SPARQL graph back-end to GNU Guix. For this, I will need to have access >>> to the package records inside the emit-* functions. >>> >>> This patch makes this change by essentially changing the "label" >>> parameter of the emit-* functions passed as "(node-label head)" into a >>> "node" parameter, passed as "head". >>> >>> The rest of the patch adapts the current emit-* functions to this >>> change. >>> >>> I tested the Graphviz, D3js, and Cypher back-ends, and all seem to work >>> as before. >>> >>> Is it OK to apply this change? >> >> Sure, looks good to me! > > Actually no! :-) > > The problem was that it broke all non-package-related “node types” (like > “guix graph -t references”), and it had the problem that it ignores the > ‘label’ procedure in . And “make check” failed. > > So I reverted it in 5e60bef9802e448924f889d34d95a249b008652c. We need > to rethink about it. > > Cheers, > Ludo’. Oops! I am sorry about this. Would it not break if we include a check for whether the node type is a package or not. Then, non-package node types are handled the “old way” and packages are handled the “new way”. I think we cannot have a generic way of exposing the specifics of a node type, so if we need to expose more information for the other node types, we have to add a type-specific implementation. If this sounds like a good idea I'll write a new patch. And while I'm at it, what set of commands fully cover the graph code for all node types? Just all variants in 'guix graph --type=X'? Thanks! Kind regards, Roel Janssen From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 25 10:51:06 2017 Received: (at 27907) by debbugs.gnu.org; 25 Aug 2017 14:51:06 +0000 Received: from localhost ([127.0.0.1]:54547 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dlFww-00032Q-5k for submit@debbugs.gnu.org; Fri, 25 Aug 2017 10:51:06 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49141) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dlFwv-00031x-1t for 27907@debbugs.gnu.org; Fri, 25 Aug 2017 10:51:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dlFwm-0007hm-K9 for 27907@debbugs.gnu.org; Fri, 25 Aug 2017 10:50:59 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:56485) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dlFwm-0007hi-GL for 27907@debbugs.gnu.org; Fri, 25 Aug 2017 10:50:56 -0400 Received: from x4db12c76.dyn.telefonica.de ([77.177.44.118]:47096 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dlFwl-000103-HQ; Fri, 25 Aug 2017 10:50:56 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Roel Janssen Subject: Re: [bug#27907] [PATCH] graph: Provide access to the package record in the emit References: <87lgn3w0n6.fsf@gnu.org> <87inhchab4.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 8 Fructidor an 225 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu Date: Fri, 25 Aug 2017 16:50:52 +0200 In-Reply-To: (Roel Janssen's message of "Fri, 25 Aug 2017 11:00:51 +0200") Message-ID: <87r2vzg0qb.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 27907 Cc: 27907@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Roel Janssen skribis: > Oops! I am sorry about this. Would it not break if we include a check f= or whether > the node type is a package or not. Then, non-package node types are > handled the =E2=80=9Cold way=E2=80=9D and packages are handled the =E2=80= =9Cnew way=E2=80=9D. > > I think we cannot have a generic way of exposing the specifics of a node > type, so if we need to expose more information for the other node types, > we have to add a type-specific implementation. Actually, we might need to discuss the specifics of why you wanted to do it in the first place. :-) It is to pass extra rendering info to the backends? (It would be helpful for instance to adjust the node color or size depending on certain parameters such as its size or number of dependents.) > If this sounds like a good idea I'll write a new patch. And while I'm > at it, what set of commands fully cover the graph code for all node > types? Just all variants in 'guix graph --type=3DX'? =E2=80=9Cmake check TESTS=3Dtests/graph.scm=E2=80=9D covers all the node ty= pes I think. Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 25 12:19:58 2017 Received: (at 27907) by debbugs.gnu.org; 25 Aug 2017 16:19:58 +0000 Received: from localhost ([127.0.0.1]:54743 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dlHKw-00073c-Iw for submit@debbugs.gnu.org; Fri, 25 Aug 2017 12:19:58 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55964) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dlHKu-00073M-Ij for 27907@debbugs.gnu.org; Fri, 25 Aug 2017 12:19:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dlHKo-0001fH-IZ for 27907@debbugs.gnu.org; Fri, 25 Aug 2017 12:19:51 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59825) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dlHKj-0001cJ-Mj; Fri, 25 Aug 2017 12:19:45 -0400 Received: from ip112-245-209-87.adsl2.static.versatel.nl ([87.209.245.112]:52341 helo=antelope) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dlHKj-0002t8-A2; Fri, 25 Aug 2017 12:19:45 -0400 References: <87lgn3w0n6.fsf@gnu.org> <87inhchab4.fsf@gnu.org> <87r2vzg0qb.fsf@gnu.org> User-agent: mu4e 0.9.18; emacs 25.1.1 From: Roel Janssen To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [bug#27907] [PATCH] graph: Provide access to the package record in the emit In-reply-to: <87r2vzg0qb.fsf@gnu.org> Date: Fri, 25 Aug 2017 18:19:36 +0200 Message-ID: <87a82ntyav.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 27907 Cc: 27907@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Ludovic Courtès writes: > Roel Janssen skribis: > >> Oops! I am sorry about this. Would it not break if we include a check for whether >> the node type is a package or not. Then, non-package node types are >> handled the “old way” and packages are handled the “new way”. >> >> I think we cannot have a generic way of exposing the specifics of a node >> type, so if we need to expose more information for the other node types, >> we have to add a type-specific implementation. > > Actually, we might need to discuss the specifics of why you wanted to do > it in the first place. :-) > > It is to pass extra rendering info to the backends? (It would be > helpful for instance to adjust the node color or size depending on > certain parameters such as its size or number of dependents.) Not necessarily rendering information, even though it could improve the displayment of packages like you say. I'd like to export more information to a graph database, so that the packages can be searched, explored and linked to in a graph that also contains stuff like how programs were run and what files that run produced. So, this is essentially an interoperability thing for communicating with other systems. > >> If this sounds like a good idea I'll write a new patch. And while I'm >> at it, what set of commands fully cover the graph code for all node >> types? Just all variants in 'guix graph --type=X'? > > “make check TESTS=tests/graph.scm” covers all the node types I think. > > Ludo’. Then I will run that command before I propose a new patch. Kind regards, Roel Janssen From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 26 04:03:33 2017 Received: (at 27907) by debbugs.gnu.org; 26 Aug 2017 08:03:33 +0000 Received: from localhost ([127.0.0.1]:55862 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dlW45-0007Vv-5O for submit@debbugs.gnu.org; Sat, 26 Aug 2017 04:03:33 -0400 Received: from eggs.gnu.org ([208.118.235.92]:44700) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dlW44-0007Vi-G5 for 27907@debbugs.gnu.org; Sat, 26 Aug 2017 04:03:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dlW3w-0001ed-0S for 27907@debbugs.gnu.org; Sat, 26 Aug 2017 04:03:27 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57874) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dlW3v-0001eY-Tt for 27907@debbugs.gnu.org; Sat, 26 Aug 2017 04:03:23 -0400 Received: from x590d0e4d.dyn.telefonica.de ([89.13.14.77]:49276 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dlW3t-0003Eh-4N; Sat, 26 Aug 2017 04:03:23 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Roel Janssen Subject: Re: [bug#27907] [PATCH] graph: Provide access to the package record in the emit References: <87lgn3w0n6.fsf@gnu.org> <87inhchab4.fsf@gnu.org> <87r2vzg0qb.fsf@gnu.org> <87a82ntyav.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 9 Fructidor an 225 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu Date: Sat, 26 Aug 2017 10:02:53 +0200 In-Reply-To: <87a82ntyav.fsf@gnu.org> (Roel Janssen's message of "Fri, 25 Aug 2017 18:19:36 +0200") Message-ID: <878ti6eoya.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 27907 Cc: 27907@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Roel Janssen skribis: > Ludovic Court=C3=A8s writes: > >> Roel Janssen skribis: >> >>> Oops! I am sorry about this. Would it not break if we include a check= for whether >>> the node type is a package or not. Then, non-package node types are >>> handled the =E2=80=9Cold way=E2=80=9D and packages are handled the =E2= =80=9Cnew way=E2=80=9D. >>> >>> I think we cannot have a generic way of exposing the specifics of a node >>> type, so if we need to expose more information for the other node types, >>> we have to add a type-specific implementation. >> >> Actually, we might need to discuss the specifics of why you wanted to do >> it in the first place. :-) >> >> It is to pass extra rendering info to the backends? (It would be >> helpful for instance to adjust the node color or size depending on >> certain parameters such as its size or number of dependents.) > > Not necessarily rendering information, even though it could improve the > displayment of packages like you say. I'd like to export more > information to a graph database, so that the packages can be searched, > explored and linked to in a graph that also contains stuff like how > programs were run and what files that run produced. > > So, this is essentially an interoperability thing for communicating with > other systems. So I think an option would be to pass an extra property alist to the =E2=80=98emit-node=E2=80=99 and =E2=80=98emit-edge=E2=80=99 procedures of t= he backend. The node type would produce that alist and it would be up to the backend to make sense of it. Something along these lines. WDYT? Ludo=E2=80=99. From unknown Mon Jun 23 23:49:25 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 23 Sep 2017 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator