From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.bugs Subject: bug#12202: psyntax defeats autoload Date: Wed, 13 Mar 2013 10:01:29 +0100 Message-ID: <87txofk712.fsf@pobox.com> References: <87y5lhmowt.fsf@gnu.org> <87wqtlvlr2.fsf@pobox.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1363165338 6285 80.91.229.3 (13 Mar 2013 09:02:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 Mar 2013 09:02:18 +0000 (UTC) Cc: 12202-done@debbugs.gnu.org To: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Wed Mar 13 10:02:41 2013 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UFha2-00016B-QA for guile-bugs@m.gmane.org; Wed, 13 Mar 2013 10:02:39 +0100 Original-Received: from localhost ([::1]:56824 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFhZg-0007p2-Dv for guile-bugs@m.gmane.org; Wed, 13 Mar 2013 05:02:16 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:50854) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFhZT-0007nL-1s for bug-guile@gnu.org; Wed, 13 Mar 2013 05:02:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UFhZP-0004mo-3U for bug-guile@gnu.org; Wed, 13 Mar 2013 05:02:02 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46225) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFhZP-0004mj-1G for bug-guile@gnu.org; Wed, 13 Mar 2013 05:01:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UFhaQ-0008La-Pu for bug-guile@gnu.org; Wed, 13 Mar 2013 05:03:02 -0400 Resent-From: Andy Wingo Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: bug-guile@gnu.org Resent-Date: Wed, 13 Mar 2013 09:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 12202 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Mail-Followup-To: 12202@debbugs.gnu.org, wingo@pobox.com, ludo@gnu.org Original-Received: via spool by 12202-done@debbugs.gnu.org id=D12202.136316536332056 (code D ref 12202); Wed, 13 Mar 2013 09:03:02 +0000 Original-Received: (at 12202-done) by debbugs.gnu.org; 13 Mar 2013 09:02:43 +0000 Original-Received: from localhost ([127.0.0.1]:50332 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UFha4-0008Kx-OS for submit@debbugs.gnu.org; Wed, 13 Mar 2013 05:02:42 -0400 Original-Received: from a-pb-sasl-quonix.pobox.com ([208.72.237.25]:39127 helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UFha1-0008Kp-HT for 12202-done@debbugs.gnu.org; Wed, 13 Mar 2013 05:02:39 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 4B94FAAB1; Wed, 13 Mar 2013 05:01:32 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=9QNEcl1RsfsIAN+hm9JslKQGLMc=; b=P8poRh LZXd4iKxH684gSJ1b3130nrK37H3Wi4EoW7hRnsI1DXbzx/Q9HZKJmudwE2GWZRD rSHO5Hi/SD9Wv44oNiso0CSQNZpg2rjHa5zNvRySa1kyB+AA40LbVSNHKwmC4Ma6 ZrIwGwEvawTJyfykJuV4qKragNlxw7C9IpY/k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=Ep01X9zYiWfhNzUNfk0yjPXAw5RSaHKM HMZNs6Q8I+M+S+mC5sHTyw44CvvUK18WF3kMukVere8EOx+p73CVPWBvMbiRDQvZ NJCBKaHh5lWnzFLeKkezfmX2cC7LeuUAltL7fYk12pVOwjmAGXxqTi0/lni7dLua fAAW5qzRK/g= Original-Received: from a-pb-sasl-quonix.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 42AEAAAB0; Wed, 13 Mar 2013 05:01:32 -0400 (EDT) Original-Received: from badger (unknown [88.160.190.192]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTPSA id BB846AAAE; Wed, 13 Mar 2013 05:01:31 -0400 (EDT) In-Reply-To: <87wqtlvlr2.fsf@pobox.com> (Andy Wingo's message of "Tue, 05 Mar 2013 17:45:21 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) X-Pobox-Relay-ID: 997066D6-8BBC-11E2-9610-59240E5B5709-02397024!a-pb-sasl-quonix.pobox.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:6939 Archived-At: On Tue 05 Mar 2013 17:45, Andy Wingo 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/