[PATCH 0/2] guile-build-system: Install .scm before .go.

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Tomas Volf
Owner
unassigned
Submitted by
Tomas Volf
Severity
normal

Debbugs page

Tomas Volf wrote 1 years ago
(address . guix-patches@gnu.org)(name . Tomas Volf)(address . ~@wolfsden.cz)
cover.1708709549.git.~@wolfsden.cz
Currently the .go files are generated before installing the accompanying .scm
files, which leads to noise in the build log (source file ... newer than).
Swapping the order of the actions fixes that.

The indentation was also wrong, so I took liberty to fix that first in a
separate commit, so that the second diff is clean.

Tomas Volf (2):
build-system/guile: Fix indentation.
build-system/guile: Install .scm files first.

guix/build/guile-build-system.scm | 41 +++++++++++++++----------------
1 file changed, 20 insertions(+), 21 deletions(-)


base-commit: aefc7428203203ae88c64cc4769113453c01a185
--
2.41.0
Tomas Volf wrote 1 years ago
[PATCH 2/2] build-system/guile: Install .scm files first.
(address . 69337@debbugs.gnu.org)(name . Tomas Volf)(address . ~@wolfsden.cz)
d70daf80075b2b929d77f28c8b2a50ee1ed56d31.1708709549.git.~@wolfsden.cz
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(-)

Toggle diff (35 lines)
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
Tomas Volf wrote 1 years ago
[PATCH 1/2] build-system/guile: Fix indentation.
(address . 69337@debbugs.gnu.org)(name . Tomas Volf)(address . ~@wolfsden.cz)
316aa06d566021f1082ba7b6d10b265673c3079a.1708709549.git.~@wolfsden.cz
The inner (let) was on the same level as the outer one, which was confusing.

* guix/build/guile-build-system.scm (build): Fix indentation.

Change-Id: I701b61747c270b185eac9377b066748baa2b3d20
---
guix/build/guile-build-system.scm | 40 +++++++++++++++----------------
1 file changed, 20 insertions(+), 20 deletions(-)

Toggle diff (59 lines)
diff --git a/guix/build/guile-build-system.scm b/guix/build/guile-build-system.scm
index e7e7f2d0be..90a9ee182b 100644
--- a/guix/build/guile-build-system.scm
+++ b/guix/build/guile-build-system.scm
@@ -184,32 +184,32 @@ (define* (build #:key outputs inputs native-inputs
(#f "")
(path (string-append ":" path)))))
- (let ((source-files
+ (let ((source-files
(with-directory-excursion source-directory
(find-files "." scheme-file-regexp))))
- (invoke-each
- (filter-map (lambda (file)
- (and (or (not not-compiled-file-regexp)
- (not (string-match not-compiled-file-regexp
- file)))
- (cons* guild
- "guild" "compile"
- "-L" source-directory
- "-o" (string-append go-dir
- (file-sans-extension file)
- ".go")
- (string-append source-directory "/" file)
- flags)))
- source-files)
- #:max-processes (parallel-job-count)
- #:report-progress report-build-progress)
+ (invoke-each
+ (filter-map (lambda (file)
+ (and (or (not not-compiled-file-regexp)
+ (not (string-match not-compiled-file-regexp
+ file)))
+ (cons* guild
+ "guild" "compile"
+ "-L" source-directory
+ "-o" (string-append go-dir
+ (file-sans-extension file)
+ ".go")
+ (string-append source-directory "/" file)
+ flags)))
+ source-files)
+ #:max-processes (parallel-job-count)
+ #:report-progress report-build-progress)
- (for-each
- (lambda (file)
+ (for-each
+ (lambda (file)
(install-file (string-append source-directory "/" file)
(string-append module-dir
"/" (dirname file))))
- source-files))
+ source-files))
#t))
(define* (install-documentation #:key outputs
--
2.41.0
Ludovic Courtès wrote 1 years ago
Re: [bug#69337] [PATCH 0/2] guile-build-system: Install .scm before .go.
(name . Tomas Volf)(address . ~@wolfsden.cz)(address . 69337-done@debbugs.gnu.org)
87y1b0d56a.fsf@gnu.org
Hi,

Tomas Volf <~@wolfsden.cz> skribis:

Toggle quote (11 lines)
> Currently the .go files are generated before installing the accompanying .scm
> files, which leads to noise in the build log (source file ... newer than).
> Swapping the order of the actions fixes that.
>
> The indentation was also wrong, so I took liberty to fix that first in a
> separate commit, so that the second diff is clean.
>
> Tomas Volf (2):
> build-system/guile: Fix indentation.
> build-system/guile: Install .scm files first.

Applied, thanks!

Ludo’.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 69337@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 69337
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help