Package: guile;
Reported by: David Pirotte <david <at> altosw.be>
Date: Thu, 12 Mar 2015 03:19:01 UTC
Severity: normal
Done: Andy Wingo <wingo <at> pobox.com>
Bug is archived. No further changes may be made.
View this message in rfc822 format
From: help-debbugs <at> gnu.org (GNU bug Tracking System) To: David Pirotte <david <at> altosw.be> Subject: bug#20093: closed (Re: bug#20093: master: setting merge-generics duplicate-binding-handler @ expand time raises an error) Date: Thu, 23 Jun 2016 16:01:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report #20093: master: setting merge-generics duplicate-binding-handler @ expand time raises an error which was filed against the guile package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 20093 <at> debbugs.gnu.org. -- 20093: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20093 GNU Bug Tracking System Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Andy Wingo <wingo <at> pobox.com> To: David Pirotte <david <at> altosw.be> Cc: 20093-done <at> debbugs.gnu.org Subject: Re: bug#20093: master: setting merge-generics duplicate-binding-handler @ expand time raises an error Date: Thu, 23 Jun 2016 18:00:27 +0200Hi, This was interesting -- turned out that GOOPS imports `map' from (srfi srfi-1), and it's also there from (guile-user). SRFI-1 specified it via #:replace so all is well, no warnings. However merge-generics is itself a generic which needs `map' to dispatch over its types (at first) and then that recurses, leading to badness. But, you say, I only specified the duplicates handler after loading goops! Well indeed, but if a module didn't specify #:duplicates, its duplicates handling was implicitly dynamically scoped to whatever the current default-duplicates-handlers were. That seems bogus to me: the module declares its imports and exports and a lack of a declaration of #:duplicates indicates that the module is implicitly specifying the duplicate handlers that are described in the manual. In master I have changed the `default-duplicate-binding-handler' to simply access the handlers for the current module, as that seems to be the correct thing. Let me know how it goes! Closing as done but let's follow up :) Andy On Thu 12 Mar 2015 04:17, David Pirotte <david <at> altosw.be> writes: > Hello guilers, > Hi Andy, > > Following our brief chat on irc, yesterday, here is he bug I was referring to: > > GNU Guile 2.1.0.322-eb3d6 > > setting merge-generics duplicate-binding-handler @ expand time raises an > error. > > a) here is a short test case: > > #! /bin/sh > # -*- mode: scheme; coding: utf-8 -*- > exec guile -e main -s $0 "$@" > !# > > (eval-when (expand load eval) > (use-modules (oop goops)) > (default-duplicate-binding-handler > '(merge-generics replace warn-override-core warn last))) > > (define (main args) > (display "hello\n")) > > => > > david <at> capac:~/alto/projects/guile-tests/2.2/goops/duplicate-binding-handler 76 $ ./hello > ;;; note: source file /usr/alto/projects/guile-tests/2.2/goops/duplicate-binding-handler/./hello > ;;; newer than compiled /home/david/.cache/guile/ccache/2.2-LE-8-3.6/usr/alto/projects/guile-tests/2.2/goops/duplicate-binding-handler/hello.go > ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0 > ;;; or pass the --no-auto-compile argument to disable. > ;;; compiling /usr/alto/projects/guile-tests/2.2/goops/duplicate-binding-handler/./hello > ;;; WARNING: compilation of /usr/alto/projects/guile-tests/2.2/goops/duplicate-binding-handler/./hello failed: > ;;; ERROR: No applicable method for #<<generic> merge-generics (3)> in call Error while printing exception. > hello! > > > b) here is how it propagates, 'just' trying to import 2 gnome modules: > > #! /bin/sh > # -*- mode: scheme; coding: utf-8 -*- > exec guile -e main -s $0 "$@" > !# > > (eval-when (expand load eval) > (use-modules (oop goops)) > (default-duplicate-binding-handler > '(merge-generics replace warn-override-core warn last))) > > (use-modules (gnome-2) > (gnome gobject) > (gnome glib)) > > (define (main args) > (display "hello!\n")) > > => > > david <at> capac:~/alto/projects/guile-tests/2.2/goops/duplicate-binding-handler 40 $ ./hello > ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0 > ;;; or pass the --no-auto-compile argument to disable. > ;;; compiling /usr/alto/projects/guile-tests/2.2/goops/duplicate-binding-handler/./hello > ;;; WARNING: compilation of /usr/alto/projects/guile-tests/2.2/goops/duplicate-binding-handler/./hello failed: > ;;; ERROR: No applicable method for #<<generic> merge-generics (3)> in call Error while printing exception. > Backtrace: > In ice-9/boot-9.scm: > 3275: 19 [try-module-autoload _ _] > 2611: 18 [save-module-excursion #<program b6fe10 7f8a1b537984>] > 3295: 17 [#<program b6fe10 7f8a1b537984>] > In unknown file: > ?: 16 [primitive-load-path "gnome/gw/glib" #<program cb7120 7f8a1b537acc>] > In gnome/gw/glib.scm: > 15: 15 [#<unspecified>] > In unknown file: > ?: 14 [load-extension "libgw-guile-gnome-glib" "gw_init_wrapset_gnome_glib"] > In ice-9/boot-9.scm: > 2999: 13 [#<variable ac1fd0 value: #<program 7f8a1b57ae68 7f8a1b539380>> # _ _ ...] > 3275: 12 [try-module-autoload _ _] > 2611: 11 [save-module-excursion #<program b6fc90 7f8a1b537984>] > 3295: 10 [#<program b6fc90 7f8a1b537984>] > In unknown file: > ?: 9 [primitive-load-path "gnome/gw/generics" #<program d01a60 7f8a1b537acc>] > In gnome/gw/generics.scm: > 35: 8 [#f] > In ice-9/boot-9.scm: > 3136: 7 [define-module* _ #:filename _ #:pure _ #:version _ #:duplicates ...] > 3074: 6 [resolve-interface (gnome gobject generics) #:select ...] > 2999: 5 [#<variable ac1fd0 value: #<program 7f8a1b57ae68 7f8a1b539380>> # _ _ ...] > 3275: 4 [try-module-autoload _ _] > 2611: 3 [save-module-excursion #<program b6fc30 7f8a1b537984>] > 3295: 2 [#<program b6fc30 7f8a1b537984>] > In unknown file: > ?: 1 [primitive-load-path "gnome/gobject/generics" ...] > In gnome/gobject/generics.scm: > 130: 0 [()] > > gnome/gobject/generics.scm:130:0: In procedure (): > gnome/gobject/generics.scm:130:0: In procedure module-lookup: Unbound variable: <gobject> > david <at> capac:~/alto/projects/guile-tests/2.2/goops/duplicate-binding-handler 41 $ > > > Cheers, > David
[Message part 3 (message/rfc822, inline)]
From: David Pirotte <david <at> altosw.be> To: <bug-guile <at> gnu.org> Subject: master: setting merge-generics duplicate-binding-handler @ expand time raises an error Date: Thu, 12 Mar 2015 00:17:18 -0300[Message part 4 (text/plain, inline)]Hello guilers, Hi Andy, Following our brief chat on irc, yesterday, here is he bug I was referring to: GNU Guile 2.1.0.322-eb3d6 setting merge-generics duplicate-binding-handler @ expand time raises an error. a) here is a short test case: --8<---------------cut here---------------start------------->8--- #! /bin/sh # -*- mode: scheme; coding: utf-8 -*- exec guile -e main -s $0 "$@" !# (eval-when (expand load eval) (use-modules (oop goops)) (default-duplicate-binding-handler '(merge-generics replace warn-override-core warn last))) (define (main args) (display "hello\n")) --8<---------------cut here---------------start------------->8--- => david <at> capac:~/alto/projects/guile-tests/2.2/goops/duplicate-binding-handler 76 $ ./hello ;;; note: source file /usr/alto/projects/guile-tests/2.2/goops/duplicate-binding-handler/./hello ;;; newer than compiled /home/david/.cache/guile/ccache/2.2-LE-8-3.6/usr/alto/projects/guile-tests/2.2/goops/duplicate-binding-handler/hello.go ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0 ;;; or pass the --no-auto-compile argument to disable. ;;; compiling /usr/alto/projects/guile-tests/2.2/goops/duplicate-binding-handler/./hello ;;; WARNING: compilation of /usr/alto/projects/guile-tests/2.2/goops/duplicate-binding-handler/./hello failed: ;;; ERROR: No applicable method for #<<generic> merge-generics (3)> in call Error while printing exception. hello! b) here is how it propagates, 'just' trying to import 2 gnome modules: --8<---------------cut here---------------start------------->8--- #! /bin/sh # -*- mode: scheme; coding: utf-8 -*- exec guile -e main -s $0 "$@" !# (eval-when (expand load eval) (use-modules (oop goops)) (default-duplicate-binding-handler '(merge-generics replace warn-override-core warn last))) (use-modules (gnome-2) (gnome gobject) (gnome glib)) (define (main args) (display "hello!\n")) --8<---------------cut here---------------start------------->8--- => david <at> capac:~/alto/projects/guile-tests/2.2/goops/duplicate-binding-handler 40 $ ./hello ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0 ;;; or pass the --no-auto-compile argument to disable. ;;; compiling /usr/alto/projects/guile-tests/2.2/goops/duplicate-binding-handler/./hello ;;; WARNING: compilation of /usr/alto/projects/guile-tests/2.2/goops/duplicate-binding-handler/./hello failed: ;;; ERROR: No applicable method for #<<generic> merge-generics (3)> in call Error while printing exception. Backtrace: In ice-9/boot-9.scm: 3275: 19 [try-module-autoload _ _] 2611: 18 [save-module-excursion #<program b6fe10 7f8a1b537984>] 3295: 17 [#<program b6fe10 7f8a1b537984>] In unknown file: ?: 16 [primitive-load-path "gnome/gw/glib" #<program cb7120 7f8a1b537acc>] In gnome/gw/glib.scm: 15: 15 [#<unspecified>] In unknown file: ?: 14 [load-extension "libgw-guile-gnome-glib" "gw_init_wrapset_gnome_glib"] In ice-9/boot-9.scm: 2999: 13 [#<variable ac1fd0 value: #<program 7f8a1b57ae68 7f8a1b539380>> # _ _ ...] 3275: 12 [try-module-autoload _ _] 2611: 11 [save-module-excursion #<program b6fc90 7f8a1b537984>] 3295: 10 [#<program b6fc90 7f8a1b537984>] In unknown file: ?: 9 [primitive-load-path "gnome/gw/generics" #<program d01a60 7f8a1b537acc>] In gnome/gw/generics.scm: 35: 8 [#f] In ice-9/boot-9.scm: 3136: 7 [define-module* _ #:filename _ #:pure _ #:version _ #:duplicates ...] 3074: 6 [resolve-interface (gnome gobject generics) #:select ...] 2999: 5 [#<variable ac1fd0 value: #<program 7f8a1b57ae68 7f8a1b539380>> # _ _ ...] 3275: 4 [try-module-autoload _ _] 2611: 3 [save-module-excursion #<program b6fc30 7f8a1b537984>] 3295: 2 [#<program b6fc30 7f8a1b537984>] In unknown file: ?: 1 [primitive-load-path "gnome/gobject/generics" ...] In gnome/gobject/generics.scm: 130: 0 [()] gnome/gobject/generics.scm:130:0: In procedure (): gnome/gobject/generics.scm:130:0: In procedure module-lookup: Unbound variable: <gobject> david <at> capac:~/alto/projects/guile-tests/2.2/goops/duplicate-binding-handler 41 $ Cheers, David[Message part 5 (application/pgp-signature, inline)]
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.