bug-guile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#12202: psyntax defeats autoload


From: Andy Wingo
Subject: bug#12202: psyntax defeats autoload
Date: Wed, 13 Mar 2013 10:01:29 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

On Tue 05 Mar 2013 17:45, Andy Wingo <address@hidden> writes:

>> ERROR: In procedure scm-error:
>> ERROR: missing interface for module (does-not-exist)
>>
>> ... which defeats the whole purpose of autoloads.

I pushed something that simply wraps the module binder in the autoload
with a false-if-exception (that also prints a warning).

Initially I wrapped the call to resolve-module / module-variable in
psyntax.scm's get-global-definition-hook with the false-if-exception,
but I ran into something interesting.  memoize-expression, written in
memoize.c, has the job of turning tree-il into something the evaluator
can deal with.  It has to specially recognize some toplevel
applications -- like @apply.  It does this... by looking up the
variable!  So that was another place autoloads could be defeated.

In the end I would have to wrap scm_module_variable
(scm_current_module(), sym) with a catch, and that's silly -- of course
resolving some other module can fail, but you don't expect
module-variable on a known module to throw an exception.  So for that
reason it made sense to me to prevent the autoload module binder from
propagating an exception.

Andy
-- 
http://wingolog.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]