From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.devel Subject: GOOPS/compiler circular dependency Date: Fri, 27 Nov 2009 17:22:23 +0100 Message-ID: <874oogc4zk.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1259338990 29759 80.91.229.12 (27 Nov 2009 16:23:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 27 Nov 2009 16:23:10 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Nov 27 17:23:03 2009 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NE3b4-0001e7-7x for guile-devel@m.gmane.org; Fri, 27 Nov 2009 17:23:02 +0100 Original-Received: from localhost ([127.0.0.1]:44245 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NE3b3-0008MB-Do for guile-devel@m.gmane.org; Fri, 27 Nov 2009 11:23:01 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NE3b1-0008LQ-1n for guile-devel@gnu.org; Fri, 27 Nov 2009 11:22:59 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NE3av-0008J4-Mh for guile-devel@gnu.org; Fri, 27 Nov 2009 11:22:57 -0500 Original-Received: from [199.232.76.173] (port=54491 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NE3av-0008J1-Er for guile-devel@gnu.org; Fri, 27 Nov 2009 11:22:53 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:51152) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NE3av-0008PR-5w for guile-devel@gnu.org; Fri, 27 Nov 2009 11:22:53 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.50) id 1NE3ao-0001Wx-4g for guile-devel@gnu.org; Fri, 27 Nov 2009 17:22:46 +0100 Original-Received: from reverse-83.fdn.fr ([80.67.176.83]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 27 Nov 2009 17:22:46 +0100 Original-Received: from ludo by reverse-83.fdn.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 27 Nov 2009 17:22:46 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 74 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: reverse-83.fdn.fr X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 7 Frimaire an 218 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:K+UeVYBjcYn0OwdAdnf1BYp0AbM= X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:9712 Archived-At: Hello Guilers! Take ‘release_1-9-5-42-g49bb5bd’ and try this: --8<---------------cut here---------------start------------->8--- $ ./meta/guile --no-autocompile --debug \ <(echo '(debug-set! depth 200) (use-modules (oop goops))') 2>&1 Backtrace: In ice-9/boot-9.scm: 943: 0* [#] In unknown file: ?: 1* [primitive-load "/dev/fd/63"] In /dev/fd/63: 1: 2* (begin (process-use-modules (list (list #))) *unspecified*) In unknown file: ?: 3* [process-use-modules (((oop goops)))] [...] In oop/goops.scm: 1034: 17* [#] In oop/goops/dispatch.scm: 200: 18 [# # #] [...] In system/base/language.scm: 90: 22 [lookup-compilation-order scheme value] In ice-9/boot-9.scm: [...] In ice-9/boot-9.scm: 2228: 38 [process-define-module ((language glil spec) #:use-module (#) ...)] In ice-9/boot-9.scm: 2142: 39 [resolve-interface (language glil)] [...] 1473: 58 [module-modified #] In unknown file: ?: 59* [hash-set! # # #t] In oop/goops/dispatch.scm: 200: 60* [# # #] [...] In system/base/language.scm: 90: 64 [lookup-compilation-order scheme value] [...] ERROR: In procedure scm-error: ERROR: no such language glil --8<---------------cut here---------------end--------------->8--- What happens here is that loading goops.scm triggers a call to ‘delayed-compile’ in ‘dispatch.scm’ (somewhere around the define-method for ‘remove-class-accessors!’), which in turn calls ‘compile’, which looks up the ‘glil’ language, which loads ‘(language glil)’, which calls ‘module-export!’, which calls ‘module-modified’, which calls ‘hash-set!’, which calls ‘equal?’. Since modules are goopsified at this point, the generic ‘equal?’ is called, which triggers a ‘compile’, which looks up the ‘glil’ language. However, we’re still not done evaluating ‘glil/spec.scm’, so ‘glil’ is unbound in ‘(language glil spec)’, hence the “no such language” error. It may be possible to work around it by replacing a number of ‘#:use-module’ with appropriately chosen ‘#:autoload’, but a smarter idea would be welcome. :-) Thanks, Ludo’.