bug-guile
[Top][All Lists]
Advanced

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

Re: module system / (oop goops) / :duplicates (merge-generics) / bug?


From: Andy Wingo
Subject: Re: module system / (oop goops) / :duplicates (merge-generics) / bug?
Date: Thu, 18 Aug 2011 13:01:34 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)

Hi David,

I fixed it!

On Tue 12 Jul 2011 03:25, David Pirotte <address@hidden> writes:

> it only works the first time!

This was the clue.  Here's the commit log:

    fix order of importing modules and resolving duplicates handlers
    
    * module/ice-9/boot-9.scm (define-module*): Resolve duplicates handlers
      only after importing modules.  Fixes a bug in which a module with
      #:use-module (oop goops) but whose merge-generics handler got resolved
      to noop instead of the real merge-generics handler.  I can't think of
      an easy way to test this, though.
    
      Thanks to David Pirotte for the report!

It worked the first time because the define-module form got evaluated
twice: once during expand and once during eval (or load, for the
compiled case).  So the second evaluation it resolved merge-generics
correctly.

But, when loading from .go, there is no expansion, so there was just the
one define-module* invocation, which exposed this ordering issue.

Unfortunately this is very difficult to put into a test suite because it
relies on Goops *not* being loaded when define-module* is called.
Perhaps someone will come up with a nice test case, perhaps involving
a direct call to define-module* from a standalone test case.

Sorry the fix took so long, and thanks for the debugging.  Cheers!

Andy
-- 
http://wingolog.org/



reply via email to

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