guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/02: pull: Hide compilation warnings.


From: Ludovic Courtès
Subject: 02/02: pull: Hide compilation warnings.
Date: Mon, 23 Oct 2017 20:09:38 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit 2900665888ef3629e6d58a22129b69f3e62d4763
Author: Ludovic Courtès <address@hidden>
Date:   Mon Oct 23 16:47:50 2017 -0700

    pull: Hide compilation warnings.
    
    * guix/build/pull.scm (build-guix): Bind 'current-warning-port' to a
    void port.
---
 guix/build/pull.scm | 73 +++++++++++++++++++++++++++--------------------------
 1 file changed, 37 insertions(+), 36 deletions(-)

diff --git a/guix/build/pull.scm b/guix/build/pull.scm
index 588b5fe..3573241 100644
--- a/guix/build/pull.scm
+++ b/guix/build/pull.scm
@@ -119,42 +119,43 @@ containing the source code.  Write any debugging output 
to DEBUG-PORT."
     (set! %load-path (cons out %load-path))
     (set! %load-compiled-path (cons out %load-compiled-path))
 
-    ;; Compile the .scm files.  Filter out files depending on Guile-SSH when
-    ;; Guile-SSH is missing.
-    (with-directory-excursion out
-      (let ((files (filter has-all-its-dependencies?
-                           (all-scheme-files "."))))
-        (compile-files out out
-
-                       ;; XXX: 'compile-files' except ready-to-use relative
-                       ;; file names.
-                       (map (lambda (file)
-                              (if (string-prefix? "./" file)
-                                  (string-drop file 2)
-                                  file))
-                            files)
-
-                       #:workers (parallel-job-count)
-
-                       ;; Disable warnings.
-                       #:warning-options '()
-
-                       #:report-load
-                       (lambda (file total completed)
-                         (display #\cr log-port)
-                         (format log-port
-                                 "loading...\t~5,1f% of ~d files" ;FIXME: i18n
-                                 (* 100. (/ completed total)) total)
-                         (force-output log-port)
-                         (format debug-port "~%loading '~a'...~%" file))
-
-                       #:report-compilation
-                       (lambda (file total completed)
-                         (display #\cr log-port)
-                         (format log-port "compiling...\t~5,1f% of ~d files" 
;FIXME: i18n
-                                 (* 100. (/ completed total)) total)
-                         (force-output log-port)
-                         (format debug-port "~%compiling '~a'...~%" file))))))
+    ;; Compile the .scm files.  Hide warnings.
+    (parameterize ((current-warning-port (%make-void-port "w")))
+      (with-directory-excursion out
+        ;; Filter out files depending on Guile-SSH when Guile-SSH is missing.
+        (let ((files (filter has-all-its-dependencies?
+                             (all-scheme-files "."))))
+          (compile-files out out
+
+                         ;; XXX: 'compile-files' except ready-to-use relative
+                         ;; file names.
+                         (map (lambda (file)
+                                (if (string-prefix? "./" file)
+                                    (string-drop file 2)
+                                    file))
+                              files)
+
+                         #:workers (parallel-job-count)
+
+                         ;; Disable warnings.
+                         #:warning-options '()
+
+                         #:report-load
+                         (lambda (file total completed)
+                           (display #\cr log-port)
+                           (format log-port
+                                   "loading...\t~5,1f% of ~d files" ;FIXME: 
i18n
+                                   (* 100. (/ completed total)) total)
+                           (force-output log-port)
+                           (format debug-port "~%loading '~a'...~%" file))
+
+                         #:report-compilation
+                         (lambda (file total completed)
+                           (display #\cr log-port)
+                           (format log-port "compiling...\t~5,1f% of ~d files" 
;FIXME: i18n
+                                   (* 100. (/ completed total)) total)
+                           (force-output log-port)
+                           (format debug-port "~%compiling '~a'...~%" 
file)))))))
 
   (newline)
   #t)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]