unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: "pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de>
Cc: 37586@debbugs.gnu.org
Subject: bug#37586: Import cycles in unrelated packages should not be an error
Date: Sun, 06 Oct 2019 12:00:27 +0200	[thread overview]
Message-ID: <877e5ifb2c.fsf@gnu.org> (raw)
In-Reply-To: <20191002171547.ncb2hmujdwoxtquy@pelzflorian.localdomain> (pelzflorian@pelzflorian.de's message of "Wed, 2 Oct 2019 19:15:47 +0200")

Hi Florian,

"pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de> skribis:

> I am annoyed by another import cycle similar to
> <https://issues.guix.info/issue/37346> in an unfinished package I’m
> 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’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.

> 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 ‘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.

Thanks,
Ludo’.

  reply	other threads:[~2019-10-06 10:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-02 17:15 bug#37586: Import cycles in unrelated packages should not be an error pelzflorian (Florian Pelz)
2019-10-06 10:00 ` Ludovic Courtès [this message]
2019-10-06 10:40   ` pelzflorian (Florian Pelz)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877e5ifb2c.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=37586@debbugs.gnu.org \
    --cc=pelzflorian@pelzflorian.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).