GNU bug report logs - #74484
reader syntax trouble across socket

Previous Next

Package: guile;

Reported by: Christopher Howard <christopher <at> librehacker.com>

Date: Fri, 22 Nov 2024 20:52:01 UTC

Severity: normal

To reply to this bug, email your comments to 74484 AT debbugs.gnu.org.

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

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


Report forwarded to bug-guile <at> gnu.org:
bug#74484; Package guile. (Fri, 22 Nov 2024 20:52:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Christopher Howard <christopher <at> librehacker.com>:
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Fri, 22 Nov 2024 20:52:02 GMT) Full text and rfc822 format available.

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

From: Christopher Howard <christopher <at> librehacker.com>
To: bug-guile <at> gnu.org
Subject: reader syntax trouble across socket
Date: Fri, 22 Nov 2024 11:51:25 -0900
Hi, I'm trying to troubleshoot some bugs in the venerable emacs-guix package, which you've probably heard of. In its default configuration, emacs-guix uses geiser to set up one Guile REPL (*Guix REPL*) to handle various guix operations, and tells it to --listen on a domain socket; and then it uses some comint functions to connect to the domain socket, to provide another Guile REPL (*Guix Internal REPL*) which it uses for various other guix operations while the main REPL is busy.

In guix bug#73462, I figured out that the bug was caused by, for some unknown reason, (guix gexp) reader syntax was working in the main REPL (*Guix REPL*) but not in the REPL that was over the socket (*Guix Internal REPL*). A work around is available, which is to run an extra ",re (guix gexp)" in the internal REPL buffer, and then after that it works fine, but I don't understand why that should be necessary. Can somebody help me figure if this is some kind of bug in Guile, or a different issue...?

This can be reproduced this one my system command line with the following commands. Of course, you would need to adjust for your own paths. On one terminal:

``` shell
christopher <at> theoden ~$ /gnu/store/g1fhmjs2mh8a0djfnyaha49ihb5cmkas-profile/bin/guile --no-auto-compile -L /home/christopher/Repos/emacs-guix/scheme -C /home/christopher/Repos/emacs-guix/scheme -L /home/christopher/.config/guix/current/share/guile/site/3.0 -C /home/christopher/.config/guix/current/lib/guile/3.0/site-ccache --listen=/tmp/test-socket
```

Then on another terminal:

```shell
christopher <at> theoden /gnu/store/pg7s74p1p3bf2k848xy4j0x8dcqv248l-netcat-openbsd-1.219-1/bin$ ./nc -U /tmp/test-socket
GNU Guile 3.0.9
Copyright (C) 1995-2023 Free Software Foundation, Inc.

Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.

Enter `,help' for help.
scheme@(guile-user)> ,m (emacs-guix)
scheme@(emacs-guix)> (guix-command "pull")
Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
Building from this channel:
  guix      https://git.savannah.gnu.org/git/guix.git	8a7bd21
ice-9/boot-9.scm:1685:16: In procedure raise-exception:
/gnu/store/hhnw8gr26smc267yy2hzk57p4b0g6iyb-guix-8a7bd21/build-aux/build-self.scm:84:18: Unknown # object: "#~"
```

But the same command, which is (guix-command "pull") works fine in the first terminal.

Some system information:

``` guix describe
Generation 153	Nov 20 2024 09:29:24	(current)
  guix 804f8b2
    repository URL: https://git.savannah.gnu.org/git/guix.git
    branch: master
    commit: 804f8b2094f3214c5b129047c1b18a7779720496
```

``` guile --version
guile (GNU Guile) 3.0.9
```

Regarding the sockets issue, there is another bug I have found related to the use of the socket based REPL, described in bug#74250, but that one is more difficult to point to a specific cause or try to blame on Guile.

-- 
📛 Christopher Howard
🚀 gemini://gem.librehacker.com
🌐 http://gem.librehacker.com

בראשית ברא אלהים את השמים ואת הארץ




Information forwarded to bug-guile <at> gnu.org:
bug#74484; Package guile. (Mon, 09 Dec 2024 17:09:02 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: Christopher Howard <christopher <at> librehacker.com>
Cc: 74484 <at> debbugs.gnu.org
Subject: Re: bug#74484: reader syntax trouble across socket
Date: Mon, 09 Dec 2024 18:08:18 +0100
Hi Christopher,

Christopher Howard <christopher <at> librehacker.com> scribans:

> scheme@(guile-user)> ,m (emacs-guix)
> scheme@(emacs-guix)> (guix-command "pull")
> Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
> Building from this channel:
>   guix      https://git.savannah.gnu.org/git/guix.git	8a7bd21
> ice-9/boot-9.scm:1685:16: In procedure raise-exception:
> /gnu/store/hhnw8gr26smc267yy2hzk57p4b0g6iyb-guix-8a7bd21/build-aux/build-self.scm:84:18: Unknown # object: "#~"

The read syntax for #~ (gexp) is installed by loading the (guix gexp)
module or simply the (guix) module, which loads (guix gexp).

It seems that somehow Emacs-Guix does not load (guix gexp) upfront.
It’s fishy though because (guix scripts pull) definitely loads (guix
gexp), directly and indirectly.

Ludo’.




This bug report was last modified 186 days ago.

Previous Next


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