From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36077) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dlW4b-0003ge-HG for guix-patches@gnu.org; Sat, 26 Aug 2017 04:04:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dlW4Y-0001yH-7n for guix-patches@gnu.org; Sat, 26 Aug 2017 04:04:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:47181) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dlW4Y-0001yC-43 for guix-patches@gnu.org; Sat, 26 Aug 2017 04:04:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dlW4X-0007Wa-Rz for guix-patches@gnu.org; Sat, 26 Aug 2017 04:04:01 -0400 Subject: [bug#27907] [PATCH] graph: Provide access to the package record in the emit Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <87lgn3w0n6.fsf@gnu.org> <87inhchab4.fsf@gnu.org> <87r2vzg0qb.fsf@gnu.org> <87a82ntyav.fsf@gnu.org> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Roel Janssen Cc: 27907@debbugs.gnu.org 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.