build-system/guile: Install .scm files first.

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
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Tomas Volf 2024-02-23 19:18:14 +01:00 committed by Ludovic Courtès
parent c3cd24b29a
commit ef788ee2dc
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5

View File

@ -187,6 +187,12 @@ installed; this is useful for files that are meant to be included."
(let ((source-files (let ((source-files
(with-directory-excursion source-directory (with-directory-excursion source-directory
(find-files "." scheme-file-regexp)))) (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 (invoke-each
(filter-map (lambda (file) (filter-map (lambda (file)
(and (or (not not-compiled-file-regexp) (and (or (not not-compiled-file-regexp)
@ -202,14 +208,7 @@ installed; this is useful for files that are meant to be included."
flags))) flags)))
source-files) source-files)
#:max-processes (parallel-job-count) #:max-processes (parallel-job-count)
#:report-progress report-build-progress) #:report-progress report-build-progress))
(for-each
(lambda (file)
(install-file (string-append source-directory "/" file)
(string-append module-dir
"/" (dirname file))))
source-files))
#t)) #t))
(define* (install-documentation #:key outputs (define* (install-documentation #:key outputs