* Errors with (display) when building derivations from the REPL.
@ 2022-04-28 14:00 Brian Cully
2022-05-19 18:01 ` zimoun
0 siblings, 1 reply; 2+ messages in thread
From: Brian Cully @ 2022-04-28 14:00 UTC (permalink / raw)
To: Guix Devel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Errors with (display) when building derivations from the REPL.
2022-04-28 14:00 Errors with (display) when building derivations from the REPL Brian Cully
@ 2022-05-19 18:01 ` zimoun
0 siblings, 0 replies; 2+ messages in thread
From: zimoun @ 2022-05-19 18:01 UTC (permalink / raw)
To: Brian Cully, Guix Devel
Hi,
On Thu, 28 Apr 2022 at 10:00, Brian Cully <bjc@spork.org> wrote:
> 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):
Well, I do not know. And my comment here is probably not helpful.
Hum, it seems there is limitation by Geiser building some packages. For
instance, it had been reported [1,2]; via Emacs-Guix but maybe it is
from Geiser. Well, give a look at the issue in the Geiser bug tracker
[3,4]. Do not miss [5]. :-)
1: <https://yhetil.org/guix/87lfcy34s8.fsf@ambrevar.xyz>
2: <https://yhetil.org/guix/87ft5dzj2z.fsf@ambrevar.xyz>
3: <https://yhetil.org/guix/87pn4g8eay.fsf@ambrevar.xyz>
4: <https://gitlab.com/emacs-geiser/geiser/-/issues/9>
5: <https://yhetil.org/guix/86a6vivk04.fsf@gmail.com>
Cheers,
simon
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-05-19 18:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-28 14:00 Errors with (display) when building derivations from the REPL Brian Cully
2022-05-19 18:01 ` zimoun
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).