unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#69337] [PATCH 0/2] guile-build-system: Install .scm before .go.
@ 2024-02-23 17:32 Tomas Volf
  2024-02-23 18:18 ` [bug#69337] [PATCH 1/2] build-system/guile: Fix indentation Tomas Volf
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Tomas Volf @ 2024-02-23 17:32 UTC (permalink / raw)
  To: 69337; +Cc: Tomas Volf

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




^ permalink raw reply	[flat|nested] 4+ messages in thread

* [bug#69337] [PATCH 1/2] build-system/guile: Fix indentation.
  2024-02-23 17:32 [bug#69337] [PATCH 0/2] guile-build-system: Install .scm before .go Tomas Volf
@ 2024-02-23 18:18 ` Tomas Volf
  2024-02-23 18:18 ` [bug#69337] [PATCH 2/2] build-system/guile: Install .scm files first Tomas Volf
  2024-03-02 15:28 ` bug#69337: [PATCH 0/2] guile-build-system: Install .scm before .go Ludovic Courtès
  2 siblings, 0 replies; 4+ messages in thread
From: Tomas Volf @ 2024-02-23 18:18 UTC (permalink / raw)
  To: 69337; +Cc: Tomas Volf

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(-)

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





^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [bug#69337] [PATCH 2/2] build-system/guile: Install .scm files first.
  2024-02-23 17:32 [bug#69337] [PATCH 0/2] guile-build-system: Install .scm before .go Tomas Volf
  2024-02-23 18:18 ` [bug#69337] [PATCH 1/2] build-system/guile: Fix indentation Tomas Volf
@ 2024-02-23 18:18 ` Tomas Volf
  2024-03-02 15:28 ` bug#69337: [PATCH 0/2] guile-build-system: Install .scm before .go Ludovic Courtès
  2 siblings, 0 replies; 4+ messages in thread
From: Tomas Volf @ 2024-02-23 18:18 UTC (permalink / raw)
  To: 69337; +Cc: Tomas Volf

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





^ permalink raw reply related	[flat|nested] 4+ messages in thread

* bug#69337: [PATCH 0/2] guile-build-system: Install .scm before .go.
  2024-02-23 17:32 [bug#69337] [PATCH 0/2] guile-build-system: Install .scm before .go Tomas Volf
  2024-02-23 18:18 ` [bug#69337] [PATCH 1/2] build-system/guile: Fix indentation Tomas Volf
  2024-02-23 18:18 ` [bug#69337] [PATCH 2/2] build-system/guile: Install .scm files first Tomas Volf
@ 2024-03-02 15:28 ` Ludovic Courtès
  2 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2024-03-02 15:28 UTC (permalink / raw)
  To: Tomas Volf; +Cc: 69337-done

Hi,

Tomas Volf <~@wolfsden.cz> skribis:

> 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’.




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-03-02 15:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-23 17:32 [bug#69337] [PATCH 0/2] guile-build-system: Install .scm before .go Tomas Volf
2024-02-23 18:18 ` [bug#69337] [PATCH 1/2] build-system/guile: Fix indentation Tomas Volf
2024-02-23 18:18 ` [bug#69337] [PATCH 2/2] build-system/guile: Install .scm files first Tomas Volf
2024-03-02 15:28 ` bug#69337: [PATCH 0/2] guile-build-system: Install .scm before .go Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).