X-Loop: help-debbugs@HIDDEN Subject: bug#37586: Import cycles in unrelated packages should not be an error Resent-From: "pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-guix@HIDDEN Resent-Date: Wed, 02 Oct 2019 17:16:01 +0000 Resent-Message-ID: <handler.37586.B.157003655820966 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 37586 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 37586 <at> debbugs.gnu.org X-Debbugs-Original-To: bug-guix@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.157003655820966 (code B ref -1); Wed, 02 Oct 2019 17:16:01 +0000 Received: (at submit) by debbugs.gnu.org; 2 Oct 2019 17:15:58 +0000 Received: from localhost ([127.0.0.1]:38250 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1iFiEI-0005S6-5g for submit <at> debbugs.gnu.org; Wed, 02 Oct 2019 13:15:58 -0400 Received: from lists.gnu.org ([209.51.188.17]:43877) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <pelzflorian@HIDDEN>) id 1iFiEG-0005Rx-79 for submit <at> debbugs.gnu.org; Wed, 02 Oct 2019 13:15:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38363) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <pelzflorian@HIDDEN>) id 1iFiED-0007F3-HA for bug-guix@HIDDEN; Wed, 02 Oct 2019 13:15:55 -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,DOS_RCVD_IP_TWICE_B autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <pelzflorian@HIDDEN>) id 1iFiEC-0004kd-BC for bug-guix@HIDDEN; Wed, 02 Oct 2019 13:15:53 -0400 Received: from pelzflorian.de ([5.45.111.108]:54676 helo=mail.pelzflorian.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <pelzflorian@HIDDEN>) id 1iFiEB-0004jk-RL for bug-guix@HIDDEN; Wed, 02 Oct 2019 13:15:52 -0400 Received: from pelzflorian.localdomain (unknown [5.45.111.108]) by mail.pelzflorian.de (Postfix) with ESMTPSA id 310853602A4 for <bug-guix@HIDDEN>; Wed, 2 Oct 2019 19:15:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de; s=mail; t=1570036548; bh=JI2h17oT81k8Ow+EH6Po2eXtc2FtGF29Z9eawHBzSVc=; h=Date:From:To:Subject; b=oOzazpps6XymZVvtXMBjr5QDtkTBVsxhC9fgYIqqYde9xpfds5rF3lxd3ad672Qbg JDYgjE7QW5/JNMBEdwE6cj8MszbCzB5tjb1iiZr36SeKj/CXOyGFe30feoIm3ovYAE 3wR04/pxDp4UO/11HNrxnN8gXCqdoBwFBCHaAqhw= Date: Wed, 2 Oct 2019 19:15:47 +0200 From: "pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN> Message-ID: <20191002171547.ncb2hmujdwoxtquy@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline User-Agent: NeoMutt/20180716 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 5.45.111.108 X-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.4 (--) I am annoyed by another import cycle similar to <https://issues.guix.info/issue/37346> in an unfinished package I=E2=80=99= m writing. They needlessly complicate packaging and make packagers split modules that logically should not be split. Is it possible to make import cycles not an error in Guix packages? These errors do not surface during module compilation but only when running guix show or guix build or similar. I suppose that means changing the way they are evaluated could make packages not care about dependencies in unrelated packages that just happen to be in the same module, could it? Regards, Florian
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: "pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN> Subject: bug#37586: Acknowledgement (Import cycles in unrelated packages should not be an error) Message-ID: <handler.37586.B.157003655820966.ack <at> debbugs.gnu.org> References: <20191002171547.ncb2hmujdwoxtquy@HIDDEN> X-Gnu-PR-Message: ack 37586 X-Gnu-PR-Package: guix Reply-To: 37586 <at> debbugs.gnu.org Date: Wed, 02 Oct 2019 17:16:04 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-guix@HIDDEN If you wish to submit further information on this problem, please send it to 37586 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 37586: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D37586 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: bug#37586: Import cycles in unrelated packages should not be an error Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-guix@HIDDEN Resent-Date: Sun, 06 Oct 2019 10:01:02 +0000 Resent-Message-ID: <handler.37586.B37586.157035603827770 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 37586 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: "pelzflorian \(Florian Pelz\)" <pelzflorian@HIDDEN> Cc: 37586 <at> debbugs.gnu.org Received: via spool by 37586-submit <at> debbugs.gnu.org id=B37586.157035603827770 (code B ref 37586); Sun, 06 Oct 2019 10:01:02 +0000 Received: (at 37586) by debbugs.gnu.org; 6 Oct 2019 10:00:38 +0000 Received: from localhost ([127.0.0.1]:45621 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1iH3LC-0007Do-3W for submit <at> debbugs.gnu.org; Sun, 06 Oct 2019 06:00:38 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37527) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1iH3L8-0007D6-FS for 37586 <at> debbugs.gnu.org; Sun, 06 Oct 2019 06:00:36 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:54571) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>) id 1iH3L3-0003cL-6l; Sun, 06 Oct 2019 06:00:29 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=36876 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from <ludo@HIDDEN>) id 1iH3L2-0007pX-Ly; Sun, 06 Oct 2019 06:00:29 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN> References: <20191002171547.ncb2hmujdwoxtquy@HIDDEN> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 15 =?UTF-8?Q?Vend=C3=A9miaire?= an 228 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-pc-linux-gnu Date: Sun, 06 Oct 2019 12:00:27 +0200 In-Reply-To: <20191002171547.ncb2hmujdwoxtquy@HIDDEN> (pelzflorian@HIDDEN's message of "Wed, 2 Oct 2019 19:15:47 +0200") Message-ID: <877e5ifb2c.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (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-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Hi Florian, "pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN> skribis: > I am annoyed by another import cycle similar to > <https://issues.guix.info/issue/37346> in an unfinished package I=E2=80= =99m > writing. They needlessly complicate packaging and make packagers > split modules that logically should not be split. I agree that this is annoying. > Is it possible to make import cycles not an error in Guix packages? Unfortunately no, it=E2=80=99s fundamentally impossible. When you have: (define-module (a) #:use-module (b)) (define-public var-a 42) and: (define-module (b) #:use-module (a)) (define-public var-b (+ var-a 1)) you can understand that it will or will not work depending on whether (b) or (a) is loaded first. This is what=E2=80=99s happening here. > These errors do not surface during module compilation but only when > running guix show or guix build or similar. I suppose that means > changing the way they are evaluated could make packages not care about > dependencies in unrelated packages that just happen to be in the same > module, could it? When you use =E2=80=98guix show=E2=80=99 or similar, that goes through the = package cache created during =E2=80=98guix pull=E2=80=99, which allows Guix to load direc= tly the module that contains the package. That order could be different from the one you have in your checkout. Thanks, Ludo=E2=80=99.
X-Loop: help-debbugs@HIDDEN Subject: bug#37586: Import cycles in unrelated packages should not be an error Resent-From: "pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-guix@HIDDEN Resent-Date: Sun, 06 Oct 2019 10:41:01 +0000 Resent-Message-ID: <handler.37586.B37586.157035841931584 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 37586 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN> Cc: 37586 <at> debbugs.gnu.org Received: via spool by 37586-submit <at> debbugs.gnu.org id=B37586.157035841931584 (code B ref 37586); Sun, 06 Oct 2019 10:41:01 +0000 Received: (at 37586) by debbugs.gnu.org; 6 Oct 2019 10:40:19 +0000 Received: from localhost ([127.0.0.1]:45642 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1iH3xb-0008DM-9L for submit <at> debbugs.gnu.org; Sun, 06 Oct 2019 06:40:19 -0400 Received: from pelzflorian.de ([5.45.111.108]:43466 helo=mail.pelzflorian.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <pelzflorian@HIDDEN>) id 1iH3xZ-0008DD-8E for 37586 <at> debbugs.gnu.org; Sun, 06 Oct 2019 06:40:18 -0400 Received: from pelzflorian.localdomain (unknown [5.45.111.108]) by mail.pelzflorian.de (Postfix) with ESMTPSA id 109563602A4; Sun, 6 Oct 2019 12:40:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de; s=mail; t=1570358415; bh=Y4mASjZzHNVW94odRjBCNoHjijug7Jbv1wq38UwvJKQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=my9LdelEE70oFsRHIozZC9svjnofktBGyx26oaTKhpDLwW3UMITZyFqpH1ZrLGfyU k6kcoQuQkghUekoYMmtUX6zRnWQ3l8iUcYv80BoKyNqhEqZyMN+xXkZtvOAxQCxKTg 4kSrFGVOmkKJXjU8aMI15vzBhYHWp9ahTP4TMzwY= Date: Sun, 6 Oct 2019 12:40:14 +0200 From: "pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN> Message-ID: <20191006104014.oumwicescs7w3fe7@HIDDEN> References: <20191002171547.ncb2hmujdwoxtquy@HIDDEN> <877e5ifb2c.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <877e5ifb2c.fsf@HIDDEN> User-Agent: NeoMutt/20180716 X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) On Sun, Oct 06, 2019 at 12:00:27PM +0200, Ludovic Courtès wrote: > "pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN> skribis: > > Is it possible to make import cycles not an error in Guix packages? > > Unfortunately no, it’s fundamentally impossible. When you have: > > (define-module (a) #:use-module (b)) > (define-public var-a 42) > > and: > > (define-module (b) #:use-module (a)) > (define-public var-b (+ var-a 1)) > > you can understand that it will or will not work depending on whether > (b) or (a) is loaded first. This is what’s happening here. > […] > When you use ‘guix show’ or similar, that goes through the package cache > created during ‘guix pull’, which allows Guix to load directly the > module that contains the package. That order could be different from > the one you have in your checkout. > Thank you for the explanation. I now understand that eliminating the error is not possible within define-module. Currently, all packages rely on define-module’s “global” #:use-module form. How about adding an alternative per-package, “local” use-module, to load and unload the dependent module just for this one package? It appears to be preferrable to splitting modules. Is it worth it? Regards, Florian
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.