From: Brian Cully <bjc@spork.org>
To: Guix Devel <guix-devel@gnu.org>
Subject: Errors with (display) when building derivations from the REPL.
Date: Thu, 28 Apr 2022 10:00:01 -0400 [thread overview]
Message-ID: <871qxhqp0d.fsf@ditto.jhoto.spork.org> (raw)
I’m trying to do some work on Guix with Emacs and Geiser, and
while a lot of things work fairly well, I consistently run into
problems when trying to build derivations from the Geiser
REPL. From what I can tell by looking at where it’s breaking, it
seems to me like the output of the build process is supposed to be
captured for display by the client, but (for whatever reason) the
output port its supposed to go to is closed. The failing line
appears to be these (found in guix/store.scm:758):
--8<---------------cut here---------------start------------->8---
(let ((s (read-maybe-utf8-string p)))
(display s (current-build-output-port))
--8<---------------cut here---------------end--------------->8---
I don’t know if this is an actual bug, or if I’m expected to set
up the output port myself before attempting to do a build from the
REPL. If it is an actual bug, I’ll be happy to submit this to the
issue tracker. If it’s not, can someone tell me what I’m supposed
to be doing for this to work? Also, is there a reason that the
build’s output port doesn’t just default to standard output so no
setup would be necessary?
Sample code:
--8<---------------cut here---------------start------------->8---
(define-module (bjc repltest)
#:use-module (guix derivations)
#:use-module (guix gexp)
#:use-module (guix monads)
#:use-module (guix store))
(define (m)
(with-store store
(run-with-store store
(mlet %store-monad ((drv (lower-object
(computed-file "test"
#~(mkdir
#$output)))))
(mbegin %store-monad
(built-derivations (list drv)))))))
--8<---------------cut here---------------end--------------->8---
Backtrace:
--8<---------------cut here---------------start------------->8---
scheme@(bjc repltest)> (m)
ice-9/boot-9.scm:1685:16: In procedure raise-exception:
In procedure display: Wrong type argument in position 2: #<closed:
string 7f38350291c0>
Entering a new prompt. Type `,bt' for a backtrace or `,q' to
continue.
scheme@(bjc repltest) [1]> ,bt
In ice-9/boot-9.scm:
1752:10 8 (with-exception-handler _ _ #:unwind? _
#:unwind-for-type _)
In guix/store.scm:
658:37 7 (thunk)
In guix/monads.scm:
560:2 6 (run-with-store #<store-connection 256.99
7f382193fb90> _ #:guile-for-build _ #:system _ #:target _)
In guix/store.scm:
2001:38 5 (_ #<store-connection 256.99 7f3822eae9b0>)
1421:15 4 (_ #<store-connection 256.99 7f3822eae9b0> _ _)
759:14 3 (process-stderr _ _)
In unknown file:
2 (display "substitute: \r" #<closed: string
7f38350291c0>)
In ice-9/boot-9.scm:
1685:16 1 (raise-exception _ #:continuable? _)
1685:16 0 (raise-exception _ #:continuable? _)
--8<---------------cut here---------------end--------------->8---
-bjc
next reply other threads:[~2022-04-28 14:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-28 14:00 Brian Cully [this message]
2022-05-19 18:01 ` Errors with (display) when building derivations from the REPL zimoun
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871qxhqp0d.fsf@ditto.jhoto.spork.org \
--to=bjc@spork.org \
--cc=guix-devel@gnu.org \
/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 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).