From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH 5/6] guix: Move package-transitive-propagated-labels* and package-propagated-input-refs to (guix packages). Date: Wed, 22 Jul 2015 15:20:11 +0200 Message-ID: <87io9cba7o.fsf@gnu.org> References: <1436488689-4078-1-git-send-email-ericbavier@openmailbox.org> <1436488689-4078-5-git-send-email-ericbavier@openmailbox.org> <20150721211143.6edeaae7@openmailbox.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40677) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZHtwe-0001gO-V5 for guix-devel@gnu.org; Wed, 22 Jul 2015 09:20:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZHtwZ-00062I-W7 for guix-devel@gnu.org; Wed, 22 Jul 2015 09:20:24 -0400 In-Reply-To: <20150721211143.6edeaae7@openmailbox.org> (Eric Bavier's message of "Tue, 21 Jul 2015 21:11:43 -0500") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Eric Bavier Cc: guix-devel@gnu.org, Eric Bavier Eric Bavier skribis: > From 6282f668d3cadb9f24f045a0c6992eda9fbe6d5d Mon Sep 17 00:00:00 2001 > From: Eric Bavier > Date: Tue, 21 Jul 2015 20:45:54 -0500 > Subject: [PATCH 5/6] guix: Move package-transitive-propagated-labels* and > package-propagated-input-refs to (guix packages). > > * gnu/packages/version-control.scm (package-transitive-propagated-labels*) > (package-propagated-input-refs): Move from here... > * guix/packages.scm: ...to here. [...] > +(define (package-transitive-propagated-labels* package) > + "Return a list of the input labels of PACKAGE and its transitive input= s." Why is there a star in the name? > +(define (package-propagated-input-refs inputs packages) Should be =E2=80=9Creferences=E2=80=9D, not =E2=80=9Crefs.=E2=80=9D I thin= k this one should not be exported. > + "Return a list of (assoc-ref INPUTS ) for each package in > +PACKAGES and their transitive propagated inputs." Maybe mention that this assumes that each input uses the package name as the label. > + (map (lambda (l) > + `(assoc-ref ,inputs ,l)) > + (delete-duplicates ;XXX: efficiency > + (append-map package-transitive-propagated-labels* > + packages)))) The quadratic =E2=80=98delete-duplicates=E2=80=99 is going to be a problem = sooner or later. Also, could you add one or two tests? I understand this is needed in some cases, but it is not really nice (or =E2=80=9Creally not nice=E2=80=9D?). I would rather avoid propagating the = use of these constructs, but OTOH, I have nothing better to propose currently. Could you send an updated patch? Thanks, Ludo=E2=80=99.