unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Andy Wingo <wingo@pobox.com>
To: David Pirotte <david@altosw.be>
Cc: bug-guile@gnu.org, "Ludovic Courtès" <ludo@gnu.org>
Subject: Re: module system / (oop goops) / :duplicates (merge-generics) / bug?
Date: Thu, 18 Aug 2011 13:01:34 +0200	[thread overview]
Message-ID: <87bovngf01.fsf@pobox.com> (raw)
In-Reply-To: <20110711222555.4bd45679@rascar> (David Pirotte's message of "Mon, 11 Jul 2011 22:25:55 -0300")

Hi David,

I fixed it!

On Tue 12 Jul 2011 03:25, David Pirotte <david@altosw.be> 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	other threads:[~2011-08-18 11:01 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-05 21:32 module system / (oop goops) / :duplicates (merge-generics) / bug? David Pirotte
2011-07-06 16:17 ` Ludovic Courtès
2011-07-06 19:22   ` David Pirotte
2011-07-07 11:37     ` Andy Wingo
2011-07-07 16:26       ` David Pirotte
2011-07-07 20:59         ` Andy Wingo
2011-07-08 17:05           ` David Pirotte
2011-07-09 10:02             ` Andy Wingo
2011-07-09 15:08               ` David Pirotte
2011-07-11 15:49                 ` Andy Wingo
2011-07-12  1:25                   ` David Pirotte
2011-08-18 11:01                     ` Andy Wingo [this message]
2011-08-19  5:40                       ` David Pirotte
2011-08-29 17:05                         ` David Pirotte
2011-08-30  2:56                           ` David Pirotte
2011-09-02 11:26                           ` Andy Wingo
2011-09-06 15:41                             ` David Pirotte
2011-08-03 12:28                   ` David Pirotte

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=87bovngf01.fsf@pobox.com \
    --to=wingo@pobox.com \
    --cc=bug-guile@gnu.org \
    --cc=david@altosw.be \
    --cc=ludo@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).