From: ericbavier@centurylink.net
To: 33012@debbugs.gnu.org
Cc: Eric Bavier <bavier@cray.com>
Subject: [bug#33012] [PATCH 3/3] ui: Fix port-buffering with guile@2.0.
Date: Wed, 10 Oct 2018 20:52:46 -0500 [thread overview]
Message-ID: <20181011015246.24964-4-ericbavier@centurylink.net> (raw)
In-Reply-To: <20181011015246.24964-1-ericbavier@centurylink.net>
From: Eric Bavier <bavier@cray.com>
* guix/status.scm (build-event-output-port)[guile@2.0]: Do not call 'setvbuf'
on custom binary port.
* tests/status.scm (current-build-output-port, UTF-8 + garbage)[guile@2.0]:
Use "?" in place of REPLACEMENT CHARACTER.
---
guix/status.scm | 5 +++--
tests/status.scm | 5 ++++-
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/guix/status.scm b/guix/status.scm
index 13537c70c..6dba7e049 100644
--- a/guix/status.scm
+++ b/guix/status.scm
@@ -502,8 +502,9 @@ The second return value is a thunk to retrieve the current state."
;; The build port actually receives Unicode strings.
(set-port-encoding! port "UTF-8")
- (setvbuf port (cond-expand (guile-2.2 'line) (else _IOLBF)))
-
+ (cond-expand
+ ((and guile-2 (not guile-2.2)) #t)
+ (else (setvbuf port 'line)))
(values port (lambda () %state)))
(define (call-with-status-report on-event thunk)
diff --git a/tests/status.scm b/tests/status.scm
index 486ad04dd..846a6f415 100644
--- a/tests/status.scm
+++ b/tests/status.scm
@@ -124,7 +124,10 @@
(test-equal "current-build-output-port, UTF-8 + garbage"
;; What about a mixture of UTF-8 + garbage?
- '((build-log "garbage: �lambda: λ\n"))
+ (let ((replacement (cond-expand
+ ((and guile-2 (not guile-2.2)) "?")
+ (else "�"))))
+ `((build-log ,(string-append "garbage: " replacement "lambda: λ\n"))))
(let-values (((port get-status) (build-event-output-port cons '())))
(display "garbage: " port)
(put-bytevector port #vu8(128))
--
2.19.0
next prev parent reply other threads:[~2018-10-11 1:54 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-11 1:52 [bug#33009] [PATCH 0/3] Some guile@2.0 patches ericbavier
2018-10-11 1:52 ` [bug#33011] [PATCH 1/3] gnu: guile2.0-guix: Fix build ericbavier
2018-10-14 21:39 ` Ludovic Courtès
2018-10-16 22:35 ` bug#33011: " Eric Bavier
2018-10-11 1:52 ` [bug#33010] [PATCH 2/3] gnu: Add guix-minimal ericbavier
2018-10-14 21:42 ` Ludovic Courtès
2018-10-15 9:02 ` Efraim Flashner
2018-10-15 15:46 ` Jonathan Brielmaier
2018-10-15 19:26 ` Ludovic Courtès
2018-10-15 14:21 ` Eric Bavier
2018-10-15 19:28 ` Ludovic Courtès
2018-10-15 19:43 ` Eric Bavier
2018-10-16 11:28 ` Ludovic Courtès
2018-10-16 22:33 ` bug#33010: " Eric Bavier
2018-10-11 1:52 ` ericbavier [this message]
2018-10-14 21:43 ` [bug#33012] [PATCH 3/3] ui: Fix port-buffering with guile@2.0 Ludovic Courtès
2018-10-16 22:31 ` bug#33012: " Eric Bavier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181011015246.24964-4-ericbavier@centurylink.net \
--to=ericbavier@centurylink.net \
--cc=33012@debbugs.gnu.org \
--cc=bavier@cray.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.