Subject: [bug#54482] [PATCH] gnu: Add simavr

From: Maxime Devos <[email-masked]>
Date: Sun, 20 Mar 2022 18:30:22 +0100

Artyom V. Poptsov schreef op zo 20-03-2022 om 19:36 [+0300]:
> +  #:use-module (gnu packages autotools)
> +  #:use-module (gnu packages base)
> +  #:use-module (gnu packages bash)
> +  #:use-module (gnu packages avr)

Why is (gnu packages avr) importing (gnu packages avr)?

> +  #:use-module (gnu packages elf)
> +  #:use-module (gnu packages gl)
> +  #:use-module (gnu packages pkg-config)
> +  #:use-module (gnu packages ncurses)
> +  #:use-module (gnu packages version-control)
> +  #:use-module (gnu packages ruby))

I think most users of avr-libc and avr-toolchain don't need simavr,
so WDYT of defining simavr in a separate module to avoid loading
the (gnu packages ruby) module (which has a large closure, including
much of haskell, java) unless actually necessary?  Benefits are lower
memory usage and less startup time.

Long-term, separating modules (*) a bit more would help with avoiding
circular imports (and maybe eventually, making sure imports aren't
circular at compile-time), makings some ideas for making "guix pull"
faster more feasible
<https://lists.gnu.org/archive/html/guix-devel/2022-02/msg00193.html>
and effective.  I don't think any conclusion was reached upon that
though ...

(*) Though in this case, there doesn't appear to be any circularity,
yet.

Greetings,
Maxime.