unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Ian Price <ianprice90@googlemail.com>
To: guile-devel@gnu.org
Subject: guile --listen fix
Date: Wed, 19 Sep 2012 17:51:26 +0100	[thread overview]
Message-ID: <87mx0mhs6p.fsf@googlemail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 787 bytes --]


Hi guys,

It was brought to my attention on #guile that the listen option no
longer works in guile. 

  $ guile --listen
  ice-9/psyntax.scm:1201:48: In procedure syntax-type:
  ice-9/psyntax.scm:1201:48: Syntax error:
  unknown location: source expression failed to match any pattern in form (@@ (system repl server) (spawn-server))

I think the relevant commit is a March 8th commit by Mark Weaver
(8210c85), which restricts @@ to ids only. Since this change is
sensible, and in line with what we've documented, I fixed
command-line.scm.

If you are happy with it I'll push to stable-2.0. I also have a patch to
fix a typo.

-- 
Ian Price -- shift-reset.com

"Programming is like pinball. The reward for doing it well is
the opportunity to do it again" - from "The Wizardy Compiled"


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: --listen patch --]
[-- Type: text/x-patch, Size: 2181 bytes --]

From a764dcb9735c2478392006287a97dd07541e55ee Mon Sep 17 00:00:00 2001
From: Ian Price <ianprice90@googlemail.com>
Date: Wed, 19 Sep 2012 17:33:29 +0100
Subject: [PATCH 1/2] Fix @@ usage in --listen option

* module/ice-9/command-line.scm (compile-shell-switches): @@ no longer
  supports arbitrary expressions, only identifiers.
---
 module/ice-9/command-line.scm |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/module/ice-9/command-line.scm b/module/ice-9/command-line.scm
index 62a2c9e..d409360 100644
--- a/module/ice-9/command-line.scm
+++ b/module/ice-9/command-line.scm
@@ -325,7 +325,7 @@ If FILE begins with `-' the -s switch is mandatory.
 
            ((string=? arg "--listen")   ; start a repl server
             (parse args
-                (cons '(@@ (system repl server) (spawn-server)) out)))
+                   (cons '((@@ (system repl server) spawn-server)) out)))
            
            ((string-prefix? "--listen=" arg) ; start a repl server
             (parse
@@ -336,14 +336,12 @@ If FILE begins with `-' the -s switch is mandatory.
                  ((string->number where) ; --listen=PORT
                   => (lambda (port)
                        (if (and (integer? port) (exact? port) (>= port 0))
-                           `(@@ (system repl server)
-                                (spawn-server
-                                 (make-tcp-server-socket #:port ,port)))
+                           `((@@ (system repl server) spawn-server)
+                             ((@@ (system repl server) make-tcp-server-socket) #:port ,port))
                            (error "invalid port for --listen"))))
                  ((string-prefix? "/" where) ; --listen=/PATH/TO/SOCKET
-                  `(@@ (system repl server)
-                       (spawn-server
-                        (make-unix-domain-server-socket #:path ,where))))
+                  `((@@ (system repl server) spawn-server)
+                    ((@@ (system repl server) make-unix-domain-server-socket) #:path ,where)))
                  (else
                   (error "unknown argument to --listen"))))
               out)))
-- 
1.7.7.6


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: typo patch --]
[-- Type: text/x-patch, Size: 954 bytes --]

From 9186a57acc30b99ddb93cac0168910222a30a366 Mon Sep 17 00:00:00 2001
From: Ian Price <ianprice90@googlemail.com>
Date: Wed, 19 Sep 2012 17:40:17 +0100
Subject: [PATCH 2/2] Fix typo in scheme-using.texi

* doc/ref/scheme-using.texi (System Commands): Fix typo.
---
 doc/ref/scheme-using.texi |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/doc/ref/scheme-using.texi b/doc/ref/scheme-using.texi
index 3d43913..7eb84de 100644
--- a/doc/ref/scheme-using.texi
+++ b/doc/ref/scheme-using.texi
@@ -457,7 +457,7 @@ show a short error printout.
 Default values for REPL options may be set using
 @code{repl-default-option-set!} from @code{(system repl common)}:
 
-@deffn {Scheme Procedure} repl-set-default-option! key value
+@deffn {Scheme Procedure} repl-default-option-set! key value
 Set the default value of a REPL option.  This function is particularly
 useful in a user's init file.  @xref{Init File}.
 @end deffn
-- 
1.7.7.6


             reply	other threads:[~2012-09-19 16:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-19 16:51 Ian Price [this message]
2012-09-19 17:18 ` guile --listen fix Mark H Weaver
2012-09-19 19:59   ` Ian Price
2012-10-01  5:31     ` Mark H Weaver
2012-10-01  5:48 ` Mark H Weaver
2012-10-18  4:14 ` Mark H Weaver

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://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mx0mhs6p.fsf@googlemail.com \
    --to=ianprice90@googlemail.com \
    --cc=guile-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.
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).