From: David Pirotte <david@altosw.be>
To: Andy Wingo <wingo@pobox.com>
Cc: bug-guile@gnu.org, "Ludovic Courtès" <ludo@gnu.org>
Subject: Re: module system / (oop goops) / :duplicates (merge-generics) / bug?
Date: Mon, 11 Jul 2011 22:25:55 -0300 [thread overview]
Message-ID: <20110711222555.4bd45679@rascar> (raw)
In-Reply-To: <87aack3jif.fsf@pobox.com>
[-- Attachment #1: Type: text/plain, Size: 3016 bytes --]
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: #<<gtk-window> 9ab4d10>
Printing dialog: #<<gtk-message-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 #<<accessor> dialog (1)> in call (dialog #<<tl-widget> a1ccba0>)
Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
[-- Attachment #2: mg-wgtk-1.scm --]
[-- Type: text/x-scheme, Size: 430 bytes --]
(define-module (mg-wgtk-1)
:use-module (oop goops)
:use-module (gnome gobject)
:use-module (gnome gtk)
:export (<tl-widget>
dialog
make-tl-widget
))
(define-class <tl-widget> ()
(dialog :accessor dialog :init-keyword :dialog :init-value #f)
)
(define (make-tl-widget)
(let ((tl-widget (make <tl-widget>
:dialog (make <gtk-window>
:type 'toplevel
))))
tl-widget))
[-- Attachment #3: mg-wgtk-2.scm --]
[-- Type: text/x-scheme, Size: 403 bytes --]
(define-module (mg-wgtk-2)
:use-module (oop goops)
:use-module (gnome gobject)
:use-module (gnome gtk)
:export (<p-widget>
dialog
make-p-widget
))
(define-class <p-widget> ()
(dialog :accessor dialog :init-keyword :dialog :init-value #f)
)
(define (make-p-widget)
(let ((p-widget (make <p-widget>
:dialog (make <gtk-message-dialog>
))))
p-widget))
[-- Attachment #4: mg-wgtk-3.scm --]
[-- Type: text/x-scheme, Size: 640 bytes --]
(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)
!#
next prev parent reply other threads:[~2011-07-12 1:25 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 [this message]
2011-08-18 11:01 ` Andy Wingo
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=20110711222555.4bd45679@rascar \
--to=david@altosw.be \
--cc=bug-guile@gnu.org \
--cc=ludo@gnu.org \
--cc=wingo@pobox.com \
/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).