From: ludo@gnu.org (Ludovic Courtès)
To: guile-devel@gnu.org
Subject: GOOPS/compiler circular dependency
Date: Fri, 27 Nov 2009 17:22:23 +0100 [thread overview]
Message-ID: <874oogc4zk.fsf@gnu.org> (raw)
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* [#<program 97a820 ()>]
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* [#<program 982cc0 ()>]
In oop/goops/dispatch.scm:
200: 18 [#<program aab7c0 at oop/goops/dispatch.scm:195:4 args> # #]
[...]
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 #<directory (language glil) 9860e0>]
In unknown file:
?: 59* [hash-set! #<hash-table 2/31> #<directory (language glil) 9860e0> #t]
In oop/goops/dispatch.scm:
200: 60* [#<program ac3060 at oop/goops/dispatch.scm:195:4 args> # #]
[...]
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’.
next reply other threads:[~2009-11-27 16:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-27 16:22 Ludovic Courtès [this message]
2009-12-02 20:57 ` GOOPS/compiler circular dependency Neil Jerram
2009-12-03 21:09 ` Neil Jerram
2009-12-14 22:27 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874oogc4zk.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guile-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).