From unknown Sat Sep 06 00:11:18 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#19770 <19770@debbugs.gnu.org> To: bug#19770 <19770@debbugs.gnu.org> Subject: Status: goops - setter inheritance bug - serious Reply-To: bug#19770 <19770@debbugs.gnu.org> Date: Sat, 06 Sep 2025 07:11:18 +0000 retitle 19770 goops - setter inheritance bug - serious reassign 19770 guile submitter 19770 David Pirotte severity 19770 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 04 10:44:54 2015 Received: (at submit) by debbugs.gnu.org; 4 Feb 2015 15:44:54 +0000 Received: from localhost ([127.0.0.1]:34040 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YJ28L-00040F-NO for submit@debbugs.gnu.org; Wed, 04 Feb 2015 10:44:54 -0500 Received: from eggs.gnu.org ([208.118.235.92]:43272) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YJ28K-000403-41 for submit@debbugs.gnu.org; Wed, 04 Feb 2015 10:44:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YJ289-0004cu-ND for submit@debbugs.gnu.org; Wed, 04 Feb 2015 10:44:46 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:35050) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJ289-0004co-Km for submit@debbugs.gnu.org; Wed, 04 Feb 2015 10:44:41 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44846) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJ283-0003ZO-MN for bug-guile@gnu.org; Wed, 04 Feb 2015 10:44:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YJ27y-0004PR-Iz for bug-guile@gnu.org; Wed, 04 Feb 2015 10:44:35 -0500 Received: from maximusconfessor.all2all.org ([79.99.200.102]:42264) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJ27y-0004Lb-DM for bug-guile@gnu.org; Wed, 04 Feb 2015 10:44:30 -0500 Received: from localhost (unknown [192.168.0.2]) by maximusconfessor.all2all.org (Postfix) with ESMTP id 79545A04C0CD for ; Wed, 4 Feb 2015 16:44:08 +0100 (CET) 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 u6izM4sOuSQ7 for ; Wed, 4 Feb 2015 16:44:01 +0100 (CET) Received: from capac (unknown [179.210.33.24]) by maximusconfessor.all2all.org (Postfix) with ESMTPSA id 6E5ABA04C120 for ; Wed, 4 Feb 2015 16:44:01 +0100 (CET) Date: Wed, 4 Feb 2015 13:43:58 -0200 From: David Pirotte To: Subject: goops - setter inheritance bug - serious Message-ID: <20150204134358.3bf9ace3@capac> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/pRC+e_Hzk2=+Dw4P6+WSg7n"; protocol="application/pgp-signature" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) --Sig_/pRC+e_Hzk2=+Dw4P6+WSg7n Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hello, GNU Guile 2.0.11.114-649ec goops - setter inheritance bug severity - serious setters are beeing redefined, not inhereted: this is a serious bug. Cheers, David --8<---------------cut here---------------start------------->8--- (define-module (a) #:use-module (oop goops) #:export ( !width)) (define-class () (width #:accessor !width #:init-keyword #:width #:init-value 0)) (define-method ((setter !width) (self ) width) ;; here comes complex code, computing earth orbit, captain's age... (pk "this is !width setter method, hello!") (slot-set! self 'width width)) --8<---------------cut here---------------start------------->8--- --8<---------------cut here---------------start------------->8--- (define-module (b) #:use-module (oop goops) #:use-module (a) #:export () #:re-export (!width)) (define-class ()) --8<---------------cut here---------------start------------->8--- GNU Guile 2.0.11.114-649ec Copyright (C) 1995-2014 Free Software Foundation, Inc. Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. This program is free software, and you are welcome to redistribute it under certain conditions; type `,show c' for details. Enter `,help' for help. scheme@(guile-user)>=20 scheme@(guile-user)> ,use (oop goops) scheme@(guile-user)> ,use (b) ;;; note: source file ./b.scm ;;; newer than compiled /home/david/.cache/guile/ccache/2.0-LE-8-2.0/= usr/alto/projects/guile-tests/goops/setter-inheritance-bug/b.scm.go ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=3D0 ;;; or pass the --no-auto-compile argument to disable. ;;; compiling ./b.scm ;;; note: source file ./a.scm ;;; newer than compiled /home/david/.cache/guile/ccache/2.0-LE-8-2.0/= usr/alto/projects/guile-tests/goops/setter-inheritance-bug/a.scm.go ;;; compiling ./a.scm ;;; compiled /home/david/.cache/guile/ccache/2.0-LE-8-2.0/usr/alto/projects= /guile-tests/goops/setter-inheritance-bug/a.scm.go ;;; compiled /home/david/.cache/guile/ccache/2.0-LE-8-2.0/usr/alto/projects= /guile-tests/goops/setter-inheritance-bug/b.scm.go scheme@(guile-user)> (set! (!width (make )) 20) $2 =3D 20 scheme@(guile-user)>=20 =20 --Sig_/pRC+e_Hzk2=+Dw4P6+WSg7n Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJU0j4+AAoJEPN0/ZOjBXrXJ48H/REswLwdPIYTOx6nxExl/X6j vLCGn6attnU6H4/Uk7J66MuoMbwvLs/2nveM/N4eNY2VAGurUVigTXooPezfJtGB DoY85sHQ9daah8KlxIhZXw1VpPLtayXMbhwI5KN7RXLgJnbMYAHV2xM4NBraYfb9 seJcUbEvzPWhVjU0WuSUASknCZ8UNBRaKLKtTMsMcFIcdd/TzxSt6O5UTKqXSf5y pVGaf8ZlZFl3m2ruaZfdTPOqJecUYmUHbaKn254lN/IgxgYuc8IEyWio8R7Jgp4Q jlT4hFZ24cNDtfsSt3c+pfVHqzGeTTRZHvFwo8mdoCUJjXJwHwyn6T0ipXPd8LE= =zQV6 -----END PGP SIGNATURE----- --Sig_/pRC+e_Hzk2=+Dw4P6+WSg7n-- From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 23 05:11:30 2016 Received: (at 19770-done) by debbugs.gnu.org; 23 Jun 2016 09:11:30 +0000 Received: from localhost ([127.0.0.1]:51782 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bG0fa-0000ZZ-DW for submit@debbugs.gnu.org; Thu, 23 Jun 2016 05:11:30 -0400 Received: from pb-sasl1.pobox.com ([64.147.108.66]:51931 helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bG0fZ-0000ZS-6I for 19770-done@debbugs.gnu.org; Thu, 23 Jun 2016 05:11:29 -0400 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id D188B207D9; Thu, 23 Jun 2016 05:11:28 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=Ojk4QEGVv2MZ2XDwB0MdyJVIGBc=; b=L7xf+D roIbegd6E9tFI3r2N8ATpeFRxZwgWJ8b4NmoxB80CbzvRRwzNfwZyEevXsuHZJSP Ktyf4mg2zcGnOn/eEVz8CyXLd/gEWw+Jr9YUT4emyL/WChfxoI1cxygRJLNJAcGT e/ZkxcFyGVgAGY4oIvaRh/YIlkThZHk5lwD3I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=aDzSiiMVN4svXJSEiNwkKPKXoru8hObV n0vjrPZMzwF5ZmMT1NUEdJoV12VFu9/z+f4qlbWAKJ0vi2x8soMIpjpnXkL0LBh5 LecpX+BNDvSluMNcJR7e5t+fSlI0k0T+zLjVg/u33zfljMt118qthwgUg6MU1ei3 zIZO7RT1fVE= Received: from pb-sasl1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id CA8A1207D7; Thu, 23 Jun 2016 05:11:28 -0400 (EDT) Received: from clucks (unknown [88.160.190.192]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pb-sasl1.pobox.com (Postfix) with ESMTPSA id 27484207D6; Thu, 23 Jun 2016 05:11:28 -0400 (EDT) From: Andy Wingo To: David Pirotte Subject: Re: bug#19770: goops - setter inheritance bug - serious References: <20150204134358.3bf9ace3@capac> Date: Thu, 23 Jun 2016 11:11:21 +0200 In-Reply-To: <20150204134358.3bf9ace3@capac> (David Pirotte's message of "Wed, 4 Feb 2015 13:43:58 -0200") Message-ID: <87oa6sp8w6.fsf@pobox.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 77D73D1C-3922-11E6-A716-C1836462E9F6-02397024!pb-sasl1.pobox.com X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: 19770-done Cc: 19770-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) Hi David, Sorry for the long delay. I think this is not a bug. The reason is that you defined !width as an #:accessor. That means that each concrete class which has a `width' slot will have its own accessor method installed on it. You overrode the method for instances but not for any other concrete class; e.g. will have its own method. If you want to run methods in the setter, you need to not define !width as an accessor and instead rely on your define-method to create !width as a normal generic. I.e. remove #:accessor !width from (define-class a). Andy On Wed 04 Feb 2015 16:43, David Pirotte writes: > Hello, > > GNU Guile 2.0.11.114-649ec > goops - setter inheritance bug > severity - serious > > setters are beeing redefined, not inhereted: this is a serious bug. > > Cheers, > David > > > (define-module (a) > #:use-module (oop goops) > #:export ( > !width)) > > > (define-class () > (width #:accessor !width #:init-keyword #:width #:init-value 0)) > > (define-method ((setter !width) (self ) width) > ;; here comes complex code, computing earth orbit, captain's age... > (pk "this is !width setter method, hello!") > (slot-set! self 'width width)) > > (define-module (b) > #:use-module (oop goops) > #:use-module (a) > #:export () > > #:re-export (!width)) > > > (define-class ()) > > GNU Guile 2.0.11.114-649ec > Copyright (C) 1995-2014 Free Software Foundation, Inc. > > Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. > This program is free software, and you are welcome to redistribute it > under certain conditions; type `,show c' for details. > > Enter `,help' for help. > scheme@(guile-user)> > scheme@(guile-user)> ,use (oop goops) > scheme@(guile-user)> ,use (b) > ;;; note: source file ./b.scm > ;;; newer than compiled /home/david/.cache/guile/ccache/2.0-LE-8-2.0/usr/alto/projects/guile-tests/goops/setter-inheritance-bug/b.scm.go > ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0 > ;;; or pass the --no-auto-compile argument to disable. > ;;; compiling ./b.scm > ;;; note: source file ./a.scm > ;;; newer than compiled /home/david/.cache/guile/ccache/2.0-LE-8-2.0/usr/alto/projects/guile-tests/goops/setter-inheritance-bug/a.scm.go > ;;; compiling ./a.scm > ;;; compiled /home/david/.cache/guile/ccache/2.0-LE-8-2.0/usr/alto/projects/guile-tests/goops/setter-inheritance-bug/a.scm.go > ;;; compiled /home/david/.cache/guile/ccache/2.0-LE-8-2.0/usr/alto/projects/guile-tests/goops/setter-inheritance-bug/b.scm.go > scheme@(guile-user)> (set! (!width (make )) 20) > $2 = 20 > scheme@(guile-user)> > From unknown Sat Sep 06 00:11:18 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 21 Jul 2016 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator