From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Pirotte Newsgroups: gmane.lisp.guile.bugs Subject: Re: module system / (oop goops) / :duplicates (merge-generics) / bug? Date: Mon, 11 Jul 2011 22:25:55 -0300 Message-ID: <20110711222555.4bd45679@rascar> References: <20110705183229.6f779a6b@rascar> <87vcvfcrjc.fsf@gnu.org> <20110706162244.2bf4b90a@rascar> <87ipre48zj.fsf@pobox.com> <20110707132659.2cee382d@rascar> <87box54xjg.fsf@pobox.com> <20110708140559.6ed55cd9@rascar> <87tyav3h7q.fsf@pobox.com> <20110709120816.0827236b@rascar> <87aack3jif.fsf@pobox.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/E1+XXIXOSS4=I4dR.r7vdDc" X-Trace: dough.gmane.org 1310433994 25772 80.91.229.12 (12 Jul 2011 01:26:34 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 12 Jul 2011 01:26:34 +0000 (UTC) Cc: bug-guile@gnu.org, Ludovic =?UTF-8?B?Q291cnTDqHM=?= To: Andy Wingo Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Tue Jul 12 03:26:30 2011 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QgRk5-0005R8-0e for guile-bugs@m.gmane.org; Tue, 12 Jul 2011 03:26:29 +0200 Original-Received: from localhost ([::1]:42233 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgRk3-0001KU-Cq for guile-bugs@m.gmane.org; Mon, 11 Jul 2011 21:26:27 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:38474) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgRjn-0001KE-Aw for bug-guile@gnu.org; Mon, 11 Jul 2011 21:26:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QgRjl-0004fB-Ts for bug-guile@gnu.org; Mon, 11 Jul 2011 21:26:11 -0400 Original-Received: from maximusconfessor.all2all.org ([62.58.108.13]:60619) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgRjl-0004er-L7; Mon, 11 Jul 2011 21:26:09 -0400 Original-Received: from localhost (unknown [192.168.0.2]) by maximusconfessor.all2all.org (Postfix) with ESMTP id 82B88A04C241; Tue, 12 Jul 2011 03:26:06 +0200 (CEST) Original-Received: from maximusconfessor.all2all.org ([192.168.0.1]) by localhost (maximusconfessor.all2all.org [192.168.0.2]) (amavisd-new, port 10024) with ESMTP id AiEq3l7pckOQ; Tue, 12 Jul 2011 03:07:26 +0200 (CEST) Original-Received: from rascar (unknown [139.82.89.70]) by maximusconfessor.all2all.org (Postfix) with ESMTPSA id 52B5DA04C24A; Tue, 12 Jul 2011 03:25:58 +0200 (CEST) In-Reply-To: <87aack3jif.fsf@pobox.com> X-Mailer: Claws Mail 3.7.9 (GTK+ 2.24.4; i486-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 62.58.108.13 X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:5723 Archived-At: --MP_/E1+XXIXOSS4=I4dR.r7vdDc Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Andy, > Ah, funny, I thought the version would always correspond to what you > had. But that is not the case: > > wingo@badger:~/src/guile$ git describe > v2.0.2-7-gae88d9b > wingo@badger:~/src/guile$ meta/guile > GNU Guile 2.0.2.4-c1e3e > > I guess what I meant was that you needed a newer Guile, but you might > have a new enough one. Hmm. I think I did put a finger on some deeper problem! At first, as it is still is not working here in a more 'complex environment', I did build a slightly modified version using gtk but not yet 'realizing' the widgets [attached]. It seemed it worked on one machine but not on the other. Suspecting a 'strange' collateral effect on whether I did or not put (default-duplicate-binding-handler '(merge-generics replace warn-override-core warn last)) in my init.scm file, using or not the #:duplicates ... in mg-wgtk-3.scm and, couple of hours later, almost ready to knock my head on the wall while just trying to simply produce a reproducable 'something' for you. :), than I spotted it! it only works the first time! then guile compiles and caches the .go files but does something 'different' in memory [I guess] the second time, it load the .go and fails to dispatch Here is a track on the 'latest' version [by number at least]: In a terminal: [I first remove the *.go concerned files [the location will depend off course ...] david@rascar:~/.cache/guile/ccache/2.0-LE-4-2.0/usr/local/share/guile/alto/2.0/tests 6 $ rm -f *.go david@rascar:~/.cache/guile/ccache/2.0-LE-4-2.0/usr/local/share/guile/alto/2.0/tests 7 $ ll total 0 In my emacs: david@rascar:~ 13 $ guile-gnome-2 GNU Guile 2.0.2.7-ae88d ... scheme@(guile-user)> (use-modules (mg-wgtk-3)) (letstry) ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0 ;;; or pass the --no-auto-compile argument to disable. ;;; compiling /usr/local/share/guile/alto/2.0/tests/mg-wgtk-3.scm ;;; compiling /usr/local/share/guile/alto/2.0/tests/mg-wgtk-1.scm ;;; compiled /usr/alto/staff/david/.cache/guile/ccache/2.0-LE-4-2.0/usr/local/share/guile/alto/2.0/tests/mg-wgtk-1.scm.go ;;; compiling /usr/local/share/guile/alto/2.0/tests/mg-wgtk-2.scm ;;; compiled /usr/alto/staff/david/.cache/guile/ccache/2.0-LE-4-2.0/usr/local/share/guile/alto/2.0/tests/mg-wgtk-2.scm.go WARNING: (mg-wgtk-3): `dialog' imported from both (mg-wgtk-1) and (mg-wgtk-2) ;;; compiled /usr/alto/staff/david/.cache/guile/ccache/2.0-LE-4-2.0/usr/local/share/guile/alto/2.0/tests/mg-wgtk-3.scm.go Top level dialog: #< 9ab4d10> Printing dialog: #< 9ab4600> $1 = #t scheme@(guile-user)> ,q david@rascar:~ 14 $ guile-gnome-2 GNU Guile 2.0.2.7-ae88d ... scheme@(guile-user)> (use-modules (mg-wgtk-3)) (letstry) WARNING: (mg-wgtk-3): `dialog' imported from both (mg-wgtk-1) and (mg-wgtk-2) ERROR: In procedure scm-error: ERROR: No applicable method for #< dialog (1)> in call (dialog #< a1ccba0>) Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue. --MP_/E1+XXIXOSS4=I4dR.r7vdDc Content-Type: text/x-scheme Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=mg-wgtk-1.scm (define-module (mg-wgtk-1) :use-module (oop goops) :use-module (gnome gobject) :use-module (gnome gtk) :export ( dialog make-tl-widget )) (define-class () (dialog :accessor dialog :init-keyword :dialog :init-value #f) ) (define (make-tl-widget) (let ((tl-widget (make :dialog (make :type 'toplevel )))) tl-widget)) --MP_/E1+XXIXOSS4=I4dR.r7vdDc Content-Type: text/x-scheme Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=mg-wgtk-2.scm (define-module (mg-wgtk-2) :use-module (oop goops) :use-module (gnome gobject) :use-module (gnome gtk) :export ( dialog make-p-widget )) (define-class () (dialog :accessor dialog :init-keyword :dialog :init-value #f) ) (define (make-p-widget) (let ((p-widget (make :dialog (make )))) p-widget)) --MP_/E1+XXIXOSS4=I4dR.r7vdDc Content-Type: text/x-scheme Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=mg-wgtk-3.scm (define-module (mg-wgtk-3) :use-module (ice-9 format) :use-module (oop goops) :use-module (gnome gobject) :use-module (gnome gtk) :use-module (mg-wgtk-1) :use-module (mg-wgtk-2) :duplicates (merge-generics replace warn-override-core warn last) :export (letstry )) (define (letstry) (let ((tl (make-tl-widget)) (p (make-p-widget))) (format #t "Top level dialog: ~S~%" (dialog tl)) (format #t "Printing dialog: ~S~%" (dialog p)))) #! (use-modules (macros push)) (push! "/usr/local/share/guile/alto/2.0/tests" %load-path) (use-modules (mg-wgtk-3)) (letstry) !# --MP_/E1+XXIXOSS4=I4dR.r7vdDc--