self: Mark the generation (guix config) as non-declarative.
authorLudovic Courtès <ludo@gnu.org>
Mon, 14 Nov 2022 10:05:22 +0000 (11:05 +0100)
committerLudovic Courtès <ludo@gnu.org>
Mon, 14 Nov 2022 11:31:33 +0000 (12:31 +0100)
Fixes <https://issues.guix.gnu.org/58927>.
Reported by Maxime Devos <maximedevos@telenet.be>
and Marius Bakke <marius@gnu.org>.

Starting from 076e825dc5d585943ce820a279fffe4af09757fb, "guix --version"
would print "0" as the version number, due to '%guix-version' being
inlined in (guix ui) when compiling '*core-modules*' in (guix self).

* guix/self.scm (make-config.scm): Pass #:declarative? #f.

guix/self.scm

index f46a09b..93019e1 100644 (file)
@@ -1090,6 +1090,12 @@ itself."
   (scheme-file "config.scm"
                #~(;; The following expressions get spliced.
                    (#$defmod (guix config)
+
+                     ;; Mark it as non-declarative to prevent cross-module
+                     ;; inlining that could lead to inlining %GUIX-VERSION in
+                     ;; (guix ui).
+                     #:declarative? #f
+
                      #:export (%guix-package-name
                                %guix-version
                                %guix-bug-report-address