[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/05: website: Flush the output buffer to the 'guix repl' pipe.
From: |
Ludovic Courtès |
Subject: |
02/05: website: Flush the output buffer to the 'guix repl' pipe. |
Date: |
Fri, 25 Oct 2019 06:07:27 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix-artwork.
commit 7e78d9fae999983f155950edb6d00384342b4e15
Author: Ludovic Courtès <address@hidden>
Date: Fri Oct 25 11:50:38 2019 +0200
website: Flush the output buffer to the 'guix repl' pipe.
Previously the code would occasionally get stuck in the 'read' call.
* website/.guix.scm (build): Add 'setvbuf' calls. Call 'force-output'
on PIPE. Add debugging statement.
---
website/.guix.scm | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/website/.guix.scm b/website/.guix.scm
index c3fac70..8f44c90 100644
--- a/website/.guix.scm
+++ b/website/.guix.scm
@@ -71,6 +71,9 @@
(ice-9 popen)
(ice-9 match))
+ (setvbuf (current-output-port) 'line)
+ (setvbuf (current-error-port) 'line)
+
(copy-recursively #$source ".")
;; Set 'GUILE_LOAD_PATH' so that Haunt find the Guix modules and
@@ -81,6 +84,7 @@
"repl" "-t" "machine")))
(pk 'repl-version (read pipe))
(write '(list %load-path %load-compiled-path) pipe)
+ (force-output pipe)
(match (read pipe)
(('values ('value ((load-path ...) (compiled-path ...))))
(setenv "GUILE_LOAD_PATH" (string-join
@@ -101,6 +105,7 @@
;; Use a sane default.
(setenv "XDG_CACHE_HOME" "/tmp/.cache")
+ (format #t "Running 'haunt build'...~%")
(invoke #+(file-append (specification->package "haunt")
"/bin/haunt")
"build")