GNU bug report logs - #9857
starting repl from C broken

Previous Next

Package: guile;

Reported by: Tristan Colgate <tcolgate <at> gmail.com>

Date: Mon, 24 Oct 2011 12:39:02 UTC

Severity: normal

Done: Andy Wingo <wingo <at> pobox.com>

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 9857 in the body.
You can then email your comments to 9857 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 bug-guile <at> gnu.org:
bug#9857; Package guile. (Mon, 24 Oct 2011 12:39:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tristan Colgate <tcolgate <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Mon, 24 Oct 2011 12:39:02 GMT) Full text and rfc822 format available.

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

From: Tristan Colgate <tcolgate <at> gmail.com>
To: bug-guile <at> gnu.org
Subject: starting repl from C broken
Date: Mon, 24 Oct 2011 12:29:23 +0100
Hi,

The folliowing fails for me on current master:

#include <libguile.h>

static void
inner_main (void *closure, int argc, char **argv)
{
 scm_c_use_module("system repl repl");
 scm_c_eval_string("(start-repl)");
}

int
main (int argc, char **argv)
{
 scm_boot_guile (argc, argv, inner_main, 0);
 return 0; /* never reached */
}

I get:

Backtrace:
In ice-9/boot-9.scm:
 162: 14 [catch #t #<catch-closure ed3680> ...]
 170: 13 [#<procedure e8f6e0 ()>]
In unknown file:
  ?: 12 [catch-closure]
  ?: 11 [call-with-input-string "(start-repl)" ...]
In ice-9/boot-9.scm:
2082: 10 [save-module-excursion #<procedure 11cf240 at
ice-9/eval-string.scm:65:9 ()>]
In ice-9/eval-string.scm:
 44: 9 [read-and-eval #<input: string ce2680> #:lang ...]
 37: 8 [lp (start-repl)]
In system/repl/repl.scm:
 135: 7 [start-repl # # #f]
In system/repl/common.scm:
 135: 6 [make-repl # #f]
In system/base/language.scm:
 58: 5 [lookup-language #]
In ice-9/boot-9.scm:
2476: 4 [#<procedure e832a0 at ice-9/boot-9.scm:2464:4 (name
#:optional autoload version #:key ensure)> # ...]
2733: 3 [try-module-autoload (language # spec) #f]
 550: 2 [map #<procedure e86a20 at ice-9/boot-9.scm:2733:31 (elt)> (language #)]
2734: 1 [#<procedure e86a20 at ice-9/boot-9.scm:2733:31 (elt)> #]
In unknown file:
  ?: 0 [symbol->string #]

ERROR: In procedure symbol->string:
ERROR: In procedure symbol->string: Wrong type argument in position 1
(expecting symbol): #<<language> name: scheme title: Scheme reader:
#<procedure 104a020 at language/scheme/spec.scm:34:16 (port env)>
printer: #<procedure write (_ #:optional _)> parser: #f compilers:
((tree-il . #<procedure compile-tree-il (x e opts)>)) decompilers:
((tree-il . #<procedure decompile-tree-il (x env opts)>)) evaluator:
#<procedure 1050dc0 at language/scheme/spec.scm:45:16 (x module)>
joiner: #f make-default-environment: #<procedure 1050d40 at
language/scheme/spec.scm:48:16 ()>>

Some code along these lines has been working OK on 2.0+ for a while,
not quite sure when it broke.

--
Tristan Colgate-McFarlane
----
  "You can get all your daily vitamins from 52 pints of guiness, and a
glass of milk"



-- 
Tristan Colgate-McFarlane
----
  "You can get all your daily vitamins from 52 pints of guiness, and a
glass of milk"




Information forwarded to bug-guile <at> gnu.org:
bug#9857; Package guile. (Tue, 25 Oct 2011 16:02:02 GMT) Full text and rfc822 format available.

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

From: Tristan Colgate <tcolgate <at> gmail.com>
To: 9857 <at> debbugs.gnu.org
Subject: start-repl calling convention changed
Date: Tue, 25 Oct 2011 09:14:29 +0100
Hi,

  I might have missed something int he change log, but digging through
top-repl.scm gave the answer.
I now need (start-repl 'scheme), to specify the language.

  Happy to close from my perspective but this does seem to be an API change.

-- 
Tristan Colgate-McFarlane
----
  "You can get all your daily vitamins from 52 pints of guiness, and a
glass of milk"




Information forwarded to bug-guile <at> gnu.org:
bug#9857; Package guile. (Wed, 16 Nov 2011 18:39:02 GMT) Full text and rfc822 format available.

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

From: Andy Wingo <wingo <at> pobox.com>
To: Tristan Colgate <tcolgate <at> gmail.com>
Cc: 9857 <at> debbugs.gnu.org
Subject: Re: bug#9857: start-repl calling convention changed
Date: Wed, 16 Nov 2011 19:37:52 +0100
On Tue 25 Oct 2011 10:14, Tristan Colgate <tcolgate <at> gmail.com> writes:

>   I might have missed something int he change log, but digging through
> top-repl.scm gave the answer.
> I now need (start-repl 'scheme), to specify the language.

Why, I wonder?  The definition in (system repl repl) clearly lists the
language as being optional.  Could it be that you were starting from a
different thread, and that (current-language) was #f for some reason?

>   Happy to close from my perspective but this does seem to be an API change.

If it is an API change, it's definitely a bug.

Andy
-- 
http://wingolog.org/




Reply sent to Andy Wingo <wingo <at> pobox.com>:
You have taken responsibility. (Wed, 16 Nov 2011 18:46:01 GMT) Full text and rfc822 format available.

Notification sent to Tristan Colgate <tcolgate <at> gmail.com>:
bug acknowledged by developer. (Wed, 16 Nov 2011 18:46:02 GMT) Full text and rfc822 format available.

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

From: Andy Wingo <wingo <at> pobox.com>
To: Tristan Colgate <tcolgate <at> gmail.com>
Cc: 9857-done <at> debbugs.gnu.org
Subject: Re: bug#9857: starting repl from C broken
Date: Wed, 16 Nov 2011 19:44:49 +0100
On Mon 24 Oct 2011 13:29, Tristan Colgate <tcolgate <at> gmail.com> writes:

> Hi,
>
> The folliowing fails for me on current master:
>
> #include <libguile.h>
>
> static void
> inner_main (void *closure, int argc, char **argv)
> {
>  scm_c_use_module("system repl repl");
>  scm_c_eval_string("(start-repl)");
> }
>

Sorry we didn't get this in time for 2.0.3.  It is now fixed on
stable-2.0, I think.

Andy
-- 
http://wingolog.org/




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

This bug report was last modified 12 years and 106 days ago.

Previous Next


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