unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* GOOPS/compiler circular dependency
@ 2009-11-27 16:22 Ludovic Courtès
  2009-12-02 20:57 ` Neil Jerram
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Ludovic Courtès @ 2009-11-27 16:22 UTC (permalink / raw)
  To: guile-devel

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





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

end of thread, other threads:[~2009-12-14 22:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-27 16:22 GOOPS/compiler circular dependency Ludovic Courtès
2009-12-02 20:57 ` Neil Jerram
2009-12-03 21:09 ` Neil Jerram
2009-12-14 22:27 ` Ludovic Courtès

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