guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Faster "guix pull" by incremental compilation and non-circular modules?


From: Maxime Devos
Subject: Faster "guix pull" by incremental compilation and non-circular modules?
Date: Sun, 20 Feb 2022 13:19:07 +0100
User-agent: Evolution 3.38.3-1

Ekaitz Zarraga schreef op zo 20-02-2022 om 11:34 [+0000]:
> Making a Guix pull is unpredictable too...

An idea for making "guix pull" faster:

  1. Make package imports non-circular, breaking up package modules
     in parts when necessary.

  2. Instead of building all of Guix as a single derivation,
     create a DAG of derivations.  More concretely:

     First read the *.scm files to determine which module imports
     which modules. Then to compile, say, (gnu packages acl),
     a derivation taking gnu/packages/acl.scm and its dependencies
     gnu/packages/attr.go, gnu/packages/base.go, ... is made
     compiling gnu/packages/acl.scm to a gnu/packages/acl.go.

     Then to build all of Guix, 'union-build' or 'file-union' is used.

The benefit is that if, say, gnu/packages/gnunet.scm is changed, then
the old gnu/packages/acl.go will be reused because its derivation
doesn't depend on gnu/packages/gnunet.scm (*).

The need for non-circular imports can be avoided by computing the
strongly-connected components and compiling all the modules in a
component as a single unit.

Greetings,
Maxime.

(*) Actually I didn't verify if acl.scm depends on gnunet.scm or not.

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]