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

* Re: GOOPS/compiler circular dependency
  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
  2 siblings, 0 replies; 4+ messages in thread
From: Neil Jerram @ 2009-12-02 20:57 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guile-devel

ludo@gnu.org (Ludovic Courtès) writes:

> Hello Guilers!

Hi there!

> ERROR: In procedure scm-error:
> ERROR: no such language glil

FWIW, I've been seeing this quite regularly too.  Although I don't
immediately recall what I was doing at the time... I'll provide more
detail next time it happens.

Regards,
        Neil




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

* Re: GOOPS/compiler circular dependency
  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
  2 siblings, 0 replies; 4+ messages in thread
From: Neil Jerram @ 2009-12-03 21:09 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guile-devel

ludo@gnu.org (Ludovic Courtès) writes:

[...]
> ERROR: In procedure scm-error:
> ERROR: no such language glil

Here's a similar looking case from me.

neil@arudy:~/SW/Guile/git$ meta/uninstalled-env guile --debug ../test-nj
Backtrace:
In ice-9/boot-9.scm:
2368: 19 [try-module-autoload (language glil)]
2371: 18 [#<program 934e760 at ice-9/boot-9.scm:2369:12 ()>]
1776: 17 [save-module-excursion #<program 934e6d0 at ice-9/boot-9.scm:2373:19 ()>]
2375: 16 [#<program 934e6d0 at ice-9/boot-9.scm:2373:19 ()>]
In unknown file:
   ?: 15 [#<program 934e5c0 ()>]
In ice-9/boot-9.scm:
2205: 14 [process-define-module ((language glil) #:use-module (#) #:use-module ...)]
1481: 13 [call-with-deferred-observers #<program 93596e0 at ice-9/boot-9.scm:2205:11 ()>]
2208: 12 [#<program 93596e0 at ice-9/boot-9.scm:2205:11 ()>]
3053: 11 [module-export! # #]
3054: 10 [#<program 9359680 at ice-9/boot-9.scm:3052:14 (name)> glil-kw-prelude-rest]
1702: 9 [module-ensure-local-variable! #<directory # 92501f8> glil-kw-prelude-rest]
1474: 8 [module-modified #<directory (language glil) 92501f8>]
In oop/goops/dispatch.scm:
 200: 7 [#<program 9340690 at oop/goops/dispatch.scm:195:4 args> # #]
 181: 6 [comp # #]
In system/base/compile.scm:
 239: 5 [compile (lambda (p45 c44 p43 ...) (case-lambda (# #) (args #))) #:key ...]
 178: 4 [compile-passes scheme value ()]
In system/base/language.scm:
  87: 3 [lookup-compilation-order scheme value]
In ice-9/boot-9.scm:
 129: 2 [or-map #<program 935ee00 at system/base/language.scm:79:21 (pair)> (#)]
In system/base/language.scm:
  77: 1 [lp tree-il ((# . #<program compile-tree-il (x e opts)>))]
In ice-9/boot-9.scm:
 692: 0 [error "no such language" tree-il]

ERROR: no such language tree-il
neil@arudy:~/SW/Guile/git$ 

This happened during investigation of the
no-meta-in-compiled-define-syntax-thunk problem.  I wondered if the
problem would persist if I could persuade psyntax to emit scheme instead
of tree-il when compiling - the hypothesis being that the bug is
somewhere in one of the `(case (fluid-ref *mode*) ((c) ...' fragments of
code in psyntax.scm.

So in language/scheme/compile-tree-il.scm I changed (sc-expand x 'c ...)
to (sc-expand x 'd ...), and since then have been stuck with "no such
language tree-il".

      Neil





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

* Re: GOOPS/compiler circular dependency
  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
  2 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2009-12-14 22:27 UTC (permalink / raw)
  To: guile-devel

Hello,

ludo@gnu.org (Ludovic Courtès) writes:

> Take ‘release_1-9-5-42-g49bb5bd’ and try this:
>
> $ ./meta/guile --no-autocompile --debug \
>     <(echo '(debug-set! depth 200) (use-modules (oop goops))') 2>&1

Apparently the problem vanished (we’re now 175 commits later...).

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