GNU logs - #34185, boring messages

Message sent to bug-guile@HIDDEN:

X-Loop: help-debbugs@HIDDEN
Subject: bug#34185: GOOPS - metaclass with extra-slots made trying to define a getter, a setter or an accessor will raise an exception
Resent-From: David Pirotte <david@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at>>
Resent-CC: bug-guile@HIDDEN
Resent-Date: Thu, 24 Jan 2019 01:21:02 +0000
Resent-Message-ID: <handler.34185.B.15482928038525 <at>>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 34185
X-GNU-PR-Package: guile
To: 34185 <at>, guile-devel@HIDDEN
X-Debbugs-Original-To: <bug-guile@HIDDEN>, guile-devel <guile-devel@HIDDEN>
Received: via spool by submit <at> id=B.15482928038525
          (code B ref -1); Thu, 24 Jan 2019 01:21:02 +0000
Received: (at submit) by; 24 Jan 2019 01:20:03 +0000
Received: from localhost ([]:43180
	by with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at>>)
	id 1gmTgZ-0002DQ-Eq
	for submit <at>; Wed, 23 Jan 2019 20:20:03 -0500
Received: from ([]:55736)
 by with esmtp (Exim 4.84_2)
 (envelope-from <david@HIDDEN>) id 1gmTgW-0002Cs-Sl
 for submit <at>; Wed, 23 Jan 2019 20:20:01 -0500
Received: from ([]:41306)
 by with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <david@HIDDEN>) id 1gmTgR-0006i0-KB
 for submit <at>; Wed, 23 Jan 2019 20:19:55 -0500
Received: from ([]:37681)
 by with esmtp (Exim 4.71)
 (envelope-from <david@HIDDEN>) id 1gmTgM-0006zK-V8
 for bug-guile@HIDDEN; Wed, 23 Jan 2019 20:19:54 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_LOW
 autolearn=disabled version=3.3.2
Received: from Debian-exim by with spam-scanned (Exim 4.71)
 (envelope-from <david@HIDDEN>) id 1gmTgM-0006fI-7A
 for bug-guile@HIDDEN; Wed, 23 Jan 2019 20:19:50 -0500
Received: from ([]:53366)
 by with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <david@HIDDEN>)
 id 1gmTgL-0006d4-Sd; Wed, 23 Jan 2019 20:19:50 -0500
Received: from localhost (localhost [])
 by (Postfix) with ESMTP id 00D3B1BE00E6;
 Thu, 24 Jan 2019 02:19:47 +0100 (CET)
Received: from ([])
 by localhost ( []) (amavisd-new,
 port 10024)
 with ESMTP id MNstDJac7BCz; Thu, 24 Jan 2019 02:19:46 +0100 (CET)
Received: from capac (unknown [])
 by (Postfix) with ESMTPSA id C6ADE1BE00E0;
 Thu, 24 Jan 2019 02:19:45 +0100 (CET)
Date: Wed, 23 Jan 2019 23:19:39 -0200
From: David Pirotte <david@HIDDEN>
Message-ID: <20190123231939.0a6115e6@capac>
X-Mailer: Claws Mail 3.17.2 (GTK+ 2.24.32; x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha512;
 boundary="Sig_/0RnbqR+A..mrpnw3ro8uSHw"; protocol="application/pgp-signature"
X-detected-operating-system: by GNU/Linux 2.2.x-3.x [generic]
X-detected-operating-system: by GNU/Linux 2.6.x
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at>
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <>
List-Unsubscribe: <>, 
 <mailto:debbugs-submit-request <at>>
List-Archive: <>
List-Post: <mailto:debbugs-submit <at>>
List-Help: <mailto:debbugs-submit-request <at>>
List-Subscribe: <>, 
 <mailto:debbugs-submit-request <at>>
Errors-To: debbugs-submit-bounces <at>
Sender: "Debbugs-submit" <debbugs-submit-bounces <at>>
X-Spam-Score: -1.0 (-)

Content-Type: multipart/mixed; boundary="MP_/=Fbyds6quu6u=hiWGWlrem1"

Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline


Using a metaclass that defines extra-slots, will only work if the extra-slo=
ts are
made 'exclusively' using the expression:

	(make <slot> #:name name)

If one tries to pass a setter, a getter or an accessor, it raises an except=
Attached a code snipset to reproduce the error: drop it anywhere and load i=
t, then
enter ',bt' to see the backtrace ...

	I pasted the error I get, below my signature, so one can compare
	I am using Guile

As you can see, the error is triggered by (oop goops) add-method! - called =
compute-slot-accessors - which complains that the accessor name (or getter =
or setter
name) is not a valid generic function.

Though I think it should be automatically created if it does not exists, I =
tried to create it - which you may try uncommenting line 20 and 21 of the c=
snipset - but that didn't solve the problem.


scheme@(guile-user)> (load "/usr/alto/projects/g-golf/foo-acc.scm")
;;; note: source file /usr/alto/projects/g-golf/foo-acc.scm
;;;       newer than compiled /home/david/.cache/guile/ccache/2.2-LE-8-3.A/=
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=3D0
;;;       or pass the --no-auto-compile argument to disable.
;;; compiling /usr/alto/projects/g-golf/foo-acc.scm
;;; compiled /home/david/.cache/guile/ccache/2.2-LE-8-3.A/usr/alto/projects=

Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
scheme@(foo-acc) [1]> ,bt
In ice-9/boot-9.scm:
   2316:4  7 (save-module-excursion _)
  3835:12  6 (_)
In /usr/alto/projects/g-golf/foo-acc.scm:
     36:0  5 (_)
In oop/goops.scm:
   3032:4  4 (_ _ . _)
   2925:2  3 (_ #<<foo-class> <foo> 563eb337f360> _)
In srfi/srfi-1.scm:
    640:9  2 (for-each #<procedure 563eb2b3b4c0 at oop/goops.scm:2720:3 (sl=
ot)> (#<<slot> x 563eb337f=E2=80=A6> =E2=80=A6))
In oop/goops.scm:
   2730:9  1 (_ #<<slot> x 563eb337f1b0>)
In unknown file:
           0 (scm-error goops-error #f "~S is not a valid generic function"=
 (!x) ())
scheme@(foo-acc) [1]>=20

Content-Type: text/x-scheme
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment; filename=foo-acc.scm

(define-module (foo-acc)
  #:use-module (oop goops)

  #:export (<foo-class>

(define %props

(define-class <foo-class> (<class>))

(define (compute-extra-slots props slots)
  (map (lambda (prop)
         (let ((name (string->symbol prop))
               (acc (string->symbol (string-append "!" prop)))
               #;(gen (make <generic> #:name acc)))
           #;(module-define! (current-module) acc gen)
           #;(make <slot> #:name name)
           #;(make <slot> #:name name #:getter name)
           (make <slot> #:name name #:accessor acc)))

(define-method (compute-slots (class <foo-class>))
  (let* ((slots (next-method))
         (extra (compute-extra-slots %props slots)))
    (slot-set! class 'direct-slots
               (append (slot-ref class 'direct-slots)
    (append slots extra)))

(define-class <foo> ()
  #:metaclass <foo-class>)


Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature




Message sent:

Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: David Pirotte <david@HIDDEN>
Subject: bug#34185: Acknowledgement (GOOPS - metaclass with extra-slots
 made trying to define a getter, a setter or an accessor will raise an
Message-ID: <handler.34185.B.15482928038525.ack <at>>
References: <20190123231939.0a6115e6@capac>
X-Gnu-PR-Message: ack 34185
X-Gnu-PR-Package: guile
Reply-To: 34185 <at>
Date: Thu, 24 Jan 2019 01:21:02 +0000

Thank you for filing a new bug report with

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):

If you wish to submit further information on this problem, please
send it to 34185 <at>

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems

Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.