From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: Package input loop detection Date: Mon, 12 Feb 2018 16:30:44 +0100 Message-ID: <87fu66kyxn.fsf@elephly.net> References: <87eflzfkwh.fsf@cbaines.net> 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]:60934) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1elGmF-0002pB-47 for guix-devel@gnu.org; Mon, 12 Feb 2018 11:16:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1elGmB-0001eW-Hl for guix-devel@gnu.org; Mon, 12 Feb 2018 11:16:23 -0500 Received: from sender-of-o51.zoho.com ([135.84.80.216]:21118) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1elGmB-0001dM-6O for guix-devel@gnu.org; Mon, 12 Feb 2018 11:16:19 -0500 In-reply-to: <87eflzfkwh.fsf@cbaines.net> 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" To: Christopher Baines Cc: guix-devel@gnu.org Hi, > I've had this issue for a while now, while adding some packages, I'll > create a loop in the package graph, which causes Guix to just loop > infinitely when trying to generate derivations. this is a great initiative. I=E2=80=99ve been having this issue in the pas= t as well, and I=E2=80=99d really like Guix to be a little smarter about it. > I'm not particularly fond of the implementation, because the > package-derivation function is called from expand-input called from > bag->derivation, the information about the part of the graph that has > been traversed is passed through each function. > > The seen-package-list argument could be removed, but the ordering > information is really useful when printing out the error message. I > think it should be still possible to generate this after finding the > issue by searching through the graph of packages, which would allow > removing this one argument. > > One other thought I had is that this could be extracted to something in > guix lint, which would at least allow finding these problems, without > touching the core derivation related code. I=E2=80=99d be in favour of keeping it out of the core and stash it away in= a separate tool. Not sure if that should be =E2=80=9Cguix lint=E2=80=9D (wha= t about =E2=80=9Cguix graph=E2=80=9D?), but I would prefer that over having the code run all the = time. -- Ricardo GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC https://elephly.net