From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Subject: bug#37586: Import cycles in unrelated packages should not be an error Date: Sun, 06 Oct 2019 12:00:27 +0200 Message-ID: <877e5ifb2c.fsf@gnu.org> References: <20191002171547.ncb2hmujdwoxtquy@pelzflorian.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:46626) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iH3Lb-0001IQ-NA for bug-guix@gnu.org; Sun, 06 Oct 2019 06:01:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iH3La-0003kB-If for bug-guix@gnu.org; Sun, 06 Oct 2019 06:01:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36800) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iH3La-0003k6-G4 for bug-guix@gnu.org; Sun, 06 Oct 2019 06:01:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iH3La-0007Eg-Bb for bug-guix@gnu.org; Sun, 06 Oct 2019 06:01:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <20191002171547.ncb2hmujdwoxtquy@pelzflorian.localdomain> (pelzflorian@pelzflorian.de's message of "Wed, 2 Oct 2019 19:15:47 +0200") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: "pelzflorian (Florian Pelz)" Cc: 37586@debbugs.gnu.org Hi Florian, "pelzflorian (Florian Pelz)" skribis: > I am annoyed by another import cycle similar to > 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.