unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Is this a bug?
@ 2011-08-16 12:36 rixed
  2011-08-22 22:47 ` Mark H Weaver
  0 siblings, 1 reply; 6+ messages in thread
From: rixed @ 2011-08-16 12:36 UTC (permalink / raw)
  To: guile-user

Here are two simple files :

---[ woe.scm ]---

(define-syntax without-exception
  (syntax-rules ()
                  ((without-exception key thunk ...)
				                   (catch key (lambda () thunk ...)
								   (lambda (a . r) #f)))))

---[ test.scm ]---

(load "woe.scm")
(without-exception #t (display "toto\n"))

---[ EOF ]---

Now let's run it. Notice I clean my guile cache.

% sudo rm -rf ~/.cache/guile 
% guile --version
guile (GNU Guile) 2.0.2.39-335c8
(...)
% guile -l test.scm 
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-auto-compile argument to disable.
;;; compiling /home/rixed/src/sact.junkie/test.scm
;;; /home/rixed/src/sact.junkie/test.scm:2:0: warning: possibly unbound variable `without-exception'
;;; compiled /home/rixed/.cache/guile/ccache/2.0-LE-8-2.0/home/rixed/src/sact.junkie/test.scm.go
;;; compiling /home/rixed/src/sact.junkie/woe.scm
;;; compiled /home/rixed/.cache/guile/ccache/2.0-LE-8-2.0/home/rixed/src/sact.junkie/woe.scm.go
toto
Backtrace:
In ice-9/boot-9.scm:
 170: 7 [catch #t #<catch-closure 155bd60> ...]
In unknown file:
   ?: 6 [catch-closure]
In ice-9/boot-9.scm:
  62: 5 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
 389: 4 [eval # #]
In ice-9/boot-9.scm:
2103: 3 [save-module-excursion #<procedure 181b280 at ice-9/boot-9.scm:3547:3 ()>]
3554: 2 [#<procedure 181b280 at ice-9/boot-9.scm:3547:3 ()>]
In unknown file:
   ?: 1 [load-compiled/vm "/home/rixed/.cache/guile/ccache/2.0-LE-8-2.0/home/rixed/src/sact.junkie/test.scm.go"]
In /home/rixed/src/sact.junkie/test.scm:
   2: 0 [#<procedure 19cc700 ()>]

/home/rixed/src/sact.junkie/test.scm:2:0: In procedure #<procedure 19cc700 ()>:
/home/rixed/src/sact.junkie/test.scm:2:0: Wrong type to apply: #<syntax-transformer without-exception>

This code used to work on guile 1.8, so what's wrong with it?
Also, setting GUILE_AUTO_COMPILE to 0 don't change anything, but incidentaly I discovered this:
Let's change the file permissions so that guile can no more write into it's cache, and lets touch
test.scm so that he'd like to recompile it:

% sudo chown root: -R ~/.cache/guile 
% touch test.scm
% guile -l test.scm
;;; note: source file /home/rixed/src/sact.junkie/test.scm
;;;       newer than compiled /home/rixed/.cache/guile/ccache/2.0-LE-8-2.0/home/rixed/src/sact.junkie/test.scm.go
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-auto-compile argument to disable.
;;; compiling /home/rixed/src/sact.junkie/test.scm
;;; WARNING: compilation of /home/rixed/src/sact.junkie/test.scm failed:
;;; ERROR: failed to create path for auto-compiled file "/home/rixed/src/sact.junkie/test.scm"
toto
GNU Guile 2.0.2.39-335c8
Copyright (C) 1995-2011 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)>


No more backtrace!

What's taking place?
Any idea of a workaround (apart from playing with file permissions in my cache) ?




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-08-30 17:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-16 12:36 Is this a bug? rixed
2011-08-22 22:47 ` Mark H Weaver
2011-08-29 11:27   ` rixed
2011-08-30 16:45     ` Mark H Weaver
2011-08-30 17:21       ` rixed
2011-08-30 17:24       ` Ian Price

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).