all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 65860@debbugs.gnu.org
Subject: [bug#65860] [PATCH 0/4] Resolve a circular module dependencies in embedded modules
Date: Wed, 13 Sep 2023 23:10:16 -0400	[thread overview]
Message-ID: <8734zhv49z.fsf@gmail.com> (raw)
In-Reply-To: <87r0n1kedj.fsf_-_@gnu.org> ("Ludovic Courtès"'s message of "Wed, 13 Sep 2023 22:27:36 +0200")

Hi,

Ludovic Courtès <ludo@gnu.org> writes:

> Hi,
>
> Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:
>
>> Partially addresses <https://issues.guix.gnu.org/65716>.
>>
>> * gnu/packages/avr.scm: Add commentary comment.
>> (avr-gcc): Turn into this...
>> (make-avr-gcc): ... procedure.
>> (avr-libc): Likewise, into...
>> (make-avr-gcc): ... this.  Adjust native-inputs accordingly.
>> (avr-toolchain): Likewise, into...
>> (make-avr-toolchain): ... this.
>> * gnu/packages/avr-xyz.scm (simavr) [propagated-inputs]: replace avr-toolchain
>> with a call to the 'make-avr-toolchain' procedure.
>
> [...]
>
>> Fixes <https://issues.guix.gnu.org/65716>.
>>
>> Before this change, simply adding the following import:
>>
>>   modified   gnu/packages/firmware.scm
>>   @@ -42,6 +42,7 @@ (define-module (gnu packages firmware)
>>      #:use-module (gnu packages admin)
>>      #:use-module (gnu packages autotools)
>>      #:use-module (gnu packages assembly)
>>   +  #:use-module (gnu packages avr)
>>      #:use-module (gnu packages backup)
>>      #:use-module (gnu packages base)
>>      #:use-module (gnu packages bash)
>>
>> Would cause byte compilation and/or evaluation to fail due to a circular
>> module dependency.

[...]

> People will lose the ability to install those toolchains, for instance
> with ‘guix install propeller-toolchain’, or to upgrade profiles that
> contain them (though ‘guix install axoloti-runtime’ is still good, for
> instance).
>
> I’m not sure whether that’s acceptable, but we should check with known
> users of this, such as Ricardo.

It's a pity to loose that ability (it's also a pity to not be able to
simply 'guix install gcc-cross-some-target', for the same reason) but
the statu quo where pulling (gnu packages avr) causes hard to grasp
failures is worst, in my opinion.  I wasn't able to work on adding
packages dependent on (gnu packages avr) for that reason.  Debugging was
a pain.

> I’ve always felt that these toolchains should be provided as part of the
> “regular” cross-compilation framework in cross-base.scm.  Packages that
> always need to be cross-compiled (to AVR microcontrollers, etc.) would
> have a hardcoded #:target in their ‘arguments’ field.  I forgot why this
> was rejected.

That'd be an improvement, I think.  Right now we have to call a
procedure in the input fields everywhere, it's not very elegant.  Until
then, the change proposed here seems the best we can do.  I've been
adding new avr-dependent firmware packages in (gnu packages firmware)
happily on top of it.

-- 
Thanks,
Maxim




  reply	other threads:[~2023-09-14  3:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1694406359.git.maxim.cournoyer@gmail.com>
2023-09-11  4:25 ` [bug#65860] [PATCH 1/4] gnu: avr: Delay all cross compilation packages Maxim Cournoyer
2023-09-13 20:27   ` [bug#65860] [PATCH 0/4] Resolve a circular module dependencies in embedded modules Ludovic Courtès
2023-09-14  3:10     ` Maxim Cournoyer [this message]
2023-09-14  9:10       ` Ludovic Courtès
2023-09-18  0:52         ` Maxim Cournoyer
2023-09-25 17:58           ` [bug#66063] [PATCH v2 0/3] " Maxim Cournoyer
2023-09-11  4:25 ` [bug#65860] [PATCH 2/4] gnu: embedded: Turn packages using top-level variables into procedures Maxim Cournoyer
2023-09-11  4:25 ` [bug#65860] [PATCH 3/4] gnu: Remove extraneous imports Maxim Cournoyer
2023-09-13 20:06   ` Ludovic Courtès
2023-09-17 20:27     ` Maxim Cournoyer
2023-09-11  4:26 ` [bug#65860] [PATCH 4/4] doc: Add new 'Circular Module Dependencies' section Maxim Cournoyer
2023-09-11  4:19 [bug#65860] [PATCH 0/4] Resolve a circular module dependencies in embedded modules Maxim Cournoyer

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

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

  git send-email \
    --in-reply-to=8734zhv49z.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=65860@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.