Subject: bug#66063: closed (Re: bug#66063: [PATCH v2 0/3] Resolve a circular module dependencies in embedded modules)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 25 Sep 2023 17:59:02 +0000

Your bug report

#65860: [PATCH v2 0/3] Resolve a circular module dependencies in embedded modules

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
65860: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=65860
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#66063: [PATCH v2 0/3] Resolve a circular module dependencies in embedded modules
From: Maxim Cournoyer <[email-masked]>
To: Ludovic Courtès <[email-masked]>
Cc: Ricardo Wurmus <[email-masked]>, [email-masked], [email-masked]
Date: Mon, 25 Sep 2023 13:58:26 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

Maxim Cournoyer <[email-masked]> writes:

> Hi Ludovic,
>
> Ludovic Courtès <[email-masked]> writes:
>
> [...]
>
>> I agree that this needs to be addressed.  I wondered whether/how hard we
>> should search for a different solution.
>
> OK.  I think the current situation needs to be resolved ASAP, but longer
> term I'm definitely willing to revisit our strategy when it comes to
> cross compiler toolchains.
>
> [...]
>
>> BTW, another issue with the package-returning procedures: they return a
>> fresh package object at each call, which defeats caching.  I think you
>> should be able to observe it with:
>>
>>   GUIX_PROFILING=object-cache guix build axoloti-runtime -d  --no-grafts
>>
>> The effect will be more acute on the build farms since they compute
>> derivations for everything that depends on these toolchains.
>>
>> The solution would be to make those procedures memoizing, with ‘mlambda’
>> or similar.
>
> I haven't tried measuring the impact, but I've use mlambda in the v2
> just sent; thanks for the suggesting it!

I've now pushed this series.  If we can make AVR a native
target/platform in Guix, that may make things simpler/nicer, but
otherwise, this is at least resolved.

-- 
Thanks,
Maxim

Subject: [PATCH v2 0/3] Resolve a circular module dependencies in embedded modules
From: Maxim Cournoyer <[email-masked]>
To: [email-masked]
Cc: Maxim Cournoyer <[email-masked]>
Date: Sun, 17 Sep 2023 20:41:52 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

This series is the culmination of at least a day of effort tracking down the
source of a module dependency cycle (!).  The last commit adds some guidelines
in the hope to avoid a repeat (perhaps 'lint' could be taught to
automate these checks).

Changes in v2:
- Use mlambda for procedures
- Fix ((make-avr-toolchain)) typo
- Use mlambda for procedures

Maxim Cournoyer (3):
  gnu: avr: Delay all cross compilation packages.
  gnu: embedded: Turn packages using top-level variables into
    procedures.
  doc: Add new 'Circular Module Dependencies' section.

 doc/contributing.texi         |   56 ++
 gnu/packages/avr-xyz.scm      |    2 +-
 gnu/packages/avr.scm          |  214 +++---
 gnu/packages/axoloti.scm      |    6 +-
 gnu/packages/embedded.scm     | 1227 ++++++++++++++++++---------------
 gnu/packages/raspberry-pi.scm |    2 +-
 6 files changed, 838 insertions(+), 669 deletions(-)

base-commit: fc1b4756e36857e66986a30a6652ee988f8f30fd
-- 
2.41.0