GNU bug report logs - #33012
[PATCH 3/3] ui: Fix port-buffering with guile@2.0.

Previous Next

Package: guix-patches;

Reported by: ericbavier <at> centurylink.net

Date: Thu, 11 Oct 2018 01:54:04 UTC

Severity: normal

Tags: patch

Done: Eric Bavier <ericbavier <at> centurylink.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 33012 in the body.
You can then email your comments to 33012 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#33012; Package guix-patches. (Thu, 11 Oct 2018 01:54:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to ericbavier <at> centurylink.net:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 11 Oct 2018 01:54:04 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: ericbavier <at> centurylink.net
To: guix-patches <at> gnu.org
Cc: Eric Bavier <bavier <at> cray.com>
Subject: [PATCH 3/3] ui: Fix port-buffering with guile <at> 2.0.
Date: Wed, 10 Oct 2018 20:52:46 -0500
From: Eric Bavier <bavier <at> cray.com>

* guix/status.scm (build-event-output-port)[guile <at> 2.0]: Do not call 'setvbuf'
on custom binary port.
* tests/status.scm (current-build-output-port, UTF-8 + garbage)[guile <at> 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





Information forwarded to guix-patches <at> gnu.org:
bug#33012; Package guix-patches. (Sun, 14 Oct 2018 21:44:02 GMT) Full text and rfc822 format available.

Message #8 received at 33012 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: ericbavier <at> centurylink.net
Cc: Eric Bavier <bavier <at> cray.com>, 33012 <at> debbugs.gnu.org
Subject: Re: [bug#33012] [PATCH 3/3] ui: Fix port-buffering with guile <at> 2.0.
Date: Sun, 14 Oct 2018 23:43:28 +0200
ericbavier <at> centurylink.net skribis:

> From: Eric Bavier <bavier <at> cray.com>
>
> * guix/status.scm (build-event-output-port)[guile <at> 2.0]: Do not call 'setvbuf'
> on custom binary port.
> * tests/status.scm (current-build-output-port, UTF-8 + garbage)[guile <at> 2.0]:
> Use "?" in place of REPLACEMENT CHARACTER.

LGTM, thanks!

Ludo'.




Reply sent to Eric Bavier <ericbavier <at> centurylink.net>:
You have taken responsibility. (Tue, 16 Oct 2018 22:32:02 GMT) Full text and rfc822 format available.

Notification sent to ericbavier <at> centurylink.net:
bug acknowledged by developer. (Tue, 16 Oct 2018 22:32:02 GMT) Full text and rfc822 format available.

Message #13 received at 33012-done <at> debbugs.gnu.org (full text, mbox):

From: Eric Bavier <ericbavier <at> centurylink.net>
To: 33012-done <at> debbugs.gnu.org
Subject: Re: [bug#33012] [PATCH 3/3] ui: Fix port-buffering with guile <at> 2.0.
Date: Tue, 16 Oct 2018 17:31:23 -0500
[Message part 1 (text/plain, inline)]
On Sun, 14 Oct 2018 23:43:28 +0200
ludo <at> gnu.org (Ludovic Courtès) wrote:

> ericbavier <at> centurylink.net skribis:
> 
> > From: Eric Bavier <bavier <at> cray.com>
> >
> > * guix/status.scm (build-event-output-port)[guile <at> 2.0]: Do not call 'setvbuf'
> > on custom binary port.
> > * tests/status.scm (current-build-output-port, UTF-8 + garbage)[guile <at> 2.0]:
> > Use "?" in place of REPLACEMENT CHARACTER.  
> 
> LGTM, thanks!
> 
> Ludo'.

Pushed in 278f86a43f1561b1c064ce88da012db414ec7efc
[Message part 2 (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 14 Nov 2018 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 214 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.