GNU bug report logs - #69337
[PATCH 0/2] guile-build-system: Install .scm before .go.

Previous Next

Package: guix-patches;

Reported by: Tomas Volf <~@wolfsden.cz>

Date: Fri, 23 Feb 2024 18:14:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Tomas Volf <~@wolfsden.cz>
To: 69337 <at> debbugs.gnu.org
Cc: Tomas Volf <~@wolfsden.cz>
Subject: [bug#69337] [PATCH 2/2] build-system/guile: Install .scm files first.
Date: Fri, 23 Feb 2024 19:18:14 +0100
Until now the .go files were generated first, and only after that the .scm
files were installed into the target location.  That led to a lot of messages
about `source file ... newer than compiled' if the custom 'check phase tried
to load the compiled files.

Swapping the order of the actions resolves the issue allowing the tests to be
written without lot of noise in the build log.

For final artifacts it was not a problem, since daemon resets the timestamps.

* guix/build/guile-build-system.scm (build): Install .scm before producing
.go.

Change-Id: I3428d144fcbaa6c904ee662193c3bca82589e344
---
 guix/build/guile-build-system.scm | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/guix/build/guile-build-system.scm b/guix/build/guile-build-system.scm
index 90a9ee182b..ceda4c1f4c 100644
--- a/guix/build/guile-build-system.scm
+++ b/guix/build/guile-build-system.scm
@@ -187,6 +187,12 @@ (define* (build #:key outputs inputs native-inputs
     (let ((source-files
            (with-directory-excursion source-directory
              (find-files "." scheme-file-regexp))))
+      (for-each
+       (lambda (file)
+         (install-file (string-append source-directory "/" file)
+                       (string-append module-dir
+                                      "/" (dirname file))))
+       source-files)
       (invoke-each
        (filter-map (lambda (file)
                      (and (or (not not-compiled-file-regexp)
@@ -202,14 +208,7 @@ (define* (build #:key outputs inputs native-inputs
                                  flags)))
                    source-files)
        #:max-processes (parallel-job-count)
-       #:report-progress report-build-progress)
-
-      (for-each
-       (lambda (file)
-         (install-file (string-append source-directory "/" file)
-                       (string-append module-dir
-                                      "/" (dirname file))))
-       source-files))
+       #:report-progress report-build-progress))
     #t))
 
 (define* (install-documentation #:key outputs
-- 
2.41.0





This bug report was last modified 1 year and 113 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.