[Top][All Lists]

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

GOOPS/compiler circular dependency

From: Ludovic Courtès
Subject: GOOPS/compiler circular dependency
Date: Fri, 27 Nov 2009 17:22:23 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

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


reply via email to

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