From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: dalanicolai Newsgroups: gmane.emacs.bugs Subject: bug#51068: 28.0.50; eieio defclass regression in emacs 28 Date: Thu, 7 Oct 2021 08:31:42 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000001ced9f05cdbd6bab" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17739"; mail-complaints-to="usenet@ciao.gmane.io" To: 51068@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 07 08:33:32 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mYMyB-0004P2-SM for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 07 Oct 2021 08:33:32 +0200 Original-Received: from localhost ([::1]:38496 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYMyA-0007NI-PZ for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 07 Oct 2021 02:33:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59776) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYMxj-0007NA-QA for bug-gnu-emacs@gnu.org; Thu, 07 Oct 2021 02:33:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34254) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYMxi-0004dQ-QT for bug-gnu-emacs@gnu.org; Thu, 07 Oct 2021 02:33:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mYMxi-0007ZE-LH for bug-gnu-emacs@gnu.org; Thu, 07 Oct 2021 02:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: dalanicolai Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Oct 2021 06:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 51068 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.163358832329015 (code B ref -1); Thu, 07 Oct 2021 06:33:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 7 Oct 2021 06:32:03 +0000 Original-Received: from localhost ([127.0.0.1]:45800 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mYMwk-0007Xj-DL for submit@debbugs.gnu.org; Thu, 07 Oct 2021 02:32:03 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:41874) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mYMwg-0007XS-47 for submit@debbugs.gnu.org; Thu, 07 Oct 2021 02:32:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59682) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYMwf-0007JC-TP for bug-gnu-emacs@gnu.org; Thu, 07 Oct 2021 02:31:57 -0400 Original-Received: from mail-vs1-xe2f.google.com ([2607:f8b0:4864:20::e2f]:34719) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYMwc-0002ks-Vx for bug-gnu-emacs@gnu.org; Thu, 07 Oct 2021 02:31:56 -0400 Original-Received: by mail-vs1-xe2f.google.com with SMTP id d18so5628333vsh.1 for ; Wed, 06 Oct 2021 23:31:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=CeE76ICZFs9zDulB5uQKnm9tdKlDQEZOoZjDQHIwXk4=; b=cVSRyuj+ObqQIAo0LQD3CCjuKcHPsBgW7+EO5xWC9x9sXcJc1hr1MdBiemAwtMPCwG Gf9Q64LreufdT8OxSFcujbNftFHITvM+/NlPQNFOhO6nCN6Z9+dcU2Dsj58wazev1zzG oprXCuyQqoqiXWcwWChj5Lf1SlysgI6ZrjaQIm9q9H8QzKTGmRY9mLGzGHAwXQVAFRKl 3krW5g9BvQFNROAyIZG6a9UmEdxLl21HFvX3DAUXDEYC8iRVuPs6Hqf/XAtrxdCbuBLv 6NHD6xk+OEFuZsmCDqPfQ4irnarlbTdn6NA9PhyWqiQ5PmPByGCb516EjzRtGhEZ+9az 6LWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=CeE76ICZFs9zDulB5uQKnm9tdKlDQEZOoZjDQHIwXk4=; b=57S4LCLniswoBgUly16Jh7gWOaNnLlaVAWOfTsVi4bgvU/4G26fCBbpL9/YpJ5NAy6 EUrIsH2mmr0nxOjG/nXcNhVC/q+KN+8OsJD0pNEeQN7DVaMXTAA8kXtYV0NRzvyF32v6 5U59p6FB1ZdfYUgrTU2WUlRzPDGOCa7HrCAyTmYgWY+NwvWb6moFMbGkoik1QXs5j/8i st9nm/9oSf83OswoM7K+9XeS6W8r5Na4x9IsaBFcKTOkj+nWdSLRGUjuozpVLtwRgmOi gUpL5IUoYx0CTKMp+NoYm+riEGvM4PXaLEwZPMGL6u1KjqomdFGHH56z1FdYR7Sw2qVj xO5w== X-Gm-Message-State: AOAM531FNqdUnxa5Hi/97k26CyJ9zOWO4Xgtkew5mAdUvRTWLOSbEwSr wEsQfGsQ43Lfpe58Mu2tCI7nYDKY3BR5ZdhXPS+wG7yZkSh+jQ== X-Google-Smtp-Source: ABdhPJxAcI90FKko+KUYXd6D4QnjU/bOrzf+whygecOIiQunxmJDsfJ/Ghlyax5AsgOjdvQfSIihl6brZIwXUsjkjXE= X-Received: by 2002:a05:6102:b06:: with SMTP id b6mr2046381vst.17.1633588313119; Wed, 06 Oct 2021 23:31:53 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::e2f; envelope-from=dalanicolai@gmail.com; helo=mail-vs1-xe2f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:216604 Archived-At: --0000000000001ced9f05cdbd6bab Content-Type: text/plain; charset="UTF-8" I have encountered the following confusing behavior (and 'regression' compared to Emacs 27). Starting from emacs -Q, in Emacs 27 when I try to evaluate the following code: (require 'eieio) (defclass rectangle () (height width)) different than in CLOS, Emacs errors with: '(wrong-type-argument listp height)' When I evaluate the same code in Emacs 28 then Emacs does not return an error. However, if I subsequently try to initialize the slots using: (let ((r (make-instance rectangle))) (setf (slot-value r 'height) 2 (slot-value r 'width) 3)) then Emacs 28 does return an error. If I replace the code to create the class with (adding the parentheses around the slots): (defclass rectangle () ((height) (width))) then the code above for initializing the slots works as expected (and similar behavior when using oref). Which means that also in Emacs 28 the parentheses are required. So Emacs 27 correctly errors when not using them, but Emacs 28 suggests that things are alright when omitting the parentheses which is incorrect and confusing. Then additionally, the requirement of the parentheses is, as far as I could find, not explicitly mentioned as a 'difference from CLOS' in the manual, which 'additionlly' is confusing. In GNU Emacs 28.0.50 (build 3, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, cairo version 1.17.4) of 2021-09-06 built on daniel-fedora Repository revision: c4724add006e62b81f847937db56335a81bdcc74 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12011000 System Description: Fedora 34 (Workstation Edition) Configured using: 'configure --with-mailutils --with-cairo --with-modules --with-pgtk --with-native-compilation' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK3 ZLIB Important settings: value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=none locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util rmail rmail-loaddefs auth-source password-cache json map text-property-search seq mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils help-fns radix-tree cl-print debug backtrace help-mode find-func cl-seq eieio byte-opt bytecomp byte-compile cconv eieio-core cl-macs gv eieio-loaddefs time-date subr-x cl-loaddefs cl-lib iso-transl tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 74940 7555) (symbols 48 7056 0) (strings 32 21134 1155) (string-bytes 1 724821) (vectors 16 13991) (vector-slots 8 277232 15363) (floats 8 26 33) (intervals 56 281 0) (buffers 992 13)) --0000000000001ced9f05cdbd6bab Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I have encountered t= he following confusing behavior (and 'regression'
compared to Emacs 27).

St= arting from emacs -Q, in Emacs 27 when I try to evaluate the following code= :


(requ= ire 'eieio)

(defclass rectangle ()
=C2=A0 (height width))


different than in CLOS, Em= acs errors with:
'(wrong= -type-argument listp height)'

When I evaluate the s= ame code in Emacs 28 then Emacs does not return an
error.
However, if I subsequentl= y try to initialize the slots using:


(let ((r (make-instance rectangle)))
=C2=A0 (setf (slot-value r 'heig= ht) 2
=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 (slot-value r 'width) 3))

then Emacs 28 does return an e= rror. If I replace the code to create the
class with (adding the parentheses around the slots):


(defclass rect= angle ()
=C2=A0 ((height) (w= idth)))


then the code above for initializing the slots works as expected (and simi= lar behavior when using oref). Which means that also in Emacs 28 the parent= heses are required. So Emacs 27 correctly errors when not using them, but E= macs 28 suggests that things are alright when omitting the parentheses whic= h is incorrect and confusing.
Then additionally, the requir= ement of the parentheses is, as far as I
could find, not explicitly mentioned as a 'difference from= CLOS' in the manual, which 'additionlly' is confusing.



In GNU Emacs 28.0.50 (build 3, x86_64-pc-linu= x-gnu, GTK+ Version 3.24.30, cairo version 1.17.4)
=C2=A0of 2021-09-06 built on daniel-fedora
=
Repository revision: c4724add006e62b8= 1f847937db56335a81bdcc74
Rep= ository branch: master
Windo= wing system distributor 'The X.Org Foundation', version 11.0.120110= 00
System Description: Fedor= a 34 (Workstation Edition)
<= br>
Configured using:
<= div style=3D"color:rgb(46,52,54);font-family:monospace;font-size:13.3333px;= font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacin= g:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:= 0px;text-decoration:none;width:71ch">=C2=A0'configure --with-mailutils = --with-cairo --with-modules --with-pgtk
=C2=A0--with-native-compilation'

Config= ured features:
ACL CAIRO DBU= S FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBX= ML2 M17N_FLT MODULES
NATIVE_= COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF
TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GT= K3 ZLIB

Important settings:
=C2=A0 value of $LANG: en_US.UTF-8
=C2=A0 value of $XMODIFIERS: @im=3Dnone
=C2=A0 locale-coding-system: utf-8-= unix

Major mode: Lisp Interaction

Minor modes in effect:
=C2= =A0 tooltip-mode: t
=C2=A0 g= lobal-eldoc-mode: t
=C2=A0 e= ldoc-mode: t
=C2=A0 electric= -indent-mode: t
=C2=A0 mouse= -wheel-mode: t
=C2=A0 tool-b= ar-mode: t
=C2=A0 menu-bar-m= ode: t
=C2=A0 file-name-shad= ow-mode: t
=C2=A0 global-fon= t-lock-mode: t
=C2=A0 font-l= ock-mode: t
=C2=A0 blink-cur= sor-mode: t
=C2=A0 auto-comp= osition-mode: t
=C2=A0 auto-= encryption-mode: t
=C2=A0 au= to-compression-mode: t
=C2= =A0 line-number-mode: t
=C2= =A0 indent-tabs-mode: t
=C2= =A0 transient-mark-mode: t
<= br>
Load-path shadows:
=
None found.

Featu= res:
(shadow sort mail-extr = emacsbug message rmc puny dired dired-loaddefs
rfc822 mml mml-sec epa derived epg rfc6068 epg-config gn= us-util rmail
rmail-loaddefs= auth-source password-cache json map text-property-search
seq mm-decode mm-bodies mm-encode mail-parse = rfc2231 mailabbrev
gmm-utils= mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils help-fns radix-tree cl-pr= int debug backtrace
help-mod= e find-func cl-seq eieio byte-opt bytecomp byte-compile cconv
eieio-core cl-macs gv eieio-loaddefs time= -date subr-x cl-loaddefs cl-lib
iso-transl tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/x-win x-= win term/common-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list replace newcommen= t
text-mode elisp-mode lisp-= mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch easymenu timer select scroll-bar mous= e jit-lock
font-lock syntax = font-core term/tty-colors frame minibuffer cl-generic
cham georgian utf-8-lang misc-lang vietnamese t= ibetan thai tai-viet lao
kor= ean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
<= div style=3D"color:rgb(46,52,54);font-family:monospace;font-size:13.3333px;= font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacin= g:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:= 0px;text-decoration:none;width:71ch">european ethiopic indian cyrillic chin= ese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice button loaddefs= faces cus-face macroexp files
window text-properties overlay sha1 md5 base64 format env code-pages
=
mule custom widget hashtable-pr= int-readable backquote threads dbusbind
inotify lcms2 dynamic-setting system-font-setting font-render-s= etting
cairo move-toolbar gt= k x-toolkit x multi-tty make-network-process
native-compile emacs)

Memory informati= on:
((conses 16 74940 7555)<= br>
=C2=A0(symbols 48 7056 0)
=C2=A0(strings 32 21134 1155)<= br>
=C2=A0(string-bytes 1 724821= )
=C2=A0(vectors 16 13991)
=C2=A0(vector-slots 8 277232 = 15363)
=C2=A0(floats 8 26 33= )
=C2=A0(intervals 56 281 0)=
=C2=A0(buffers 992 13))
=


--0000000000001ced9f05cdbd6bab--