From unknown Sun Jun 22 17:11:23 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#20972 <20972@debbugs.gnu.org> To: bug#20972 <20972@debbugs.gnu.org> Subject: Status: 25.0.50; eieio-persistent broken Reply-To: bug#20972 <20972@debbugs.gnu.org> Date: Mon, 23 Jun 2025 00:11:23 +0000 retitle 20972 25.0.50; eieio-persistent broken reassign 20972 emacs submitter 20972 Jan Tatarik severity 20972 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 03 07:34:45 2015 Received: (at submit) by debbugs.gnu.org; 3 Jul 2015 11:34:45 +0000 Received: from localhost ([127.0.0.1]:38281 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZAzEy-0000nf-AM for submit@debbugs.gnu.org; Fri, 03 Jul 2015 07:34:44 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39119) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZAzEw-0000nS-Fu for submit@debbugs.gnu.org; Fri, 03 Jul 2015 07:34:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZAzEq-00012G-A8 for submit@debbugs.gnu.org; Fri, 03 Jul 2015 07:34:37 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:58191) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAzEq-000129-6z for submit@debbugs.gnu.org; Fri, 03 Jul 2015 07:34:36 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52605) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAzEp-0000C9-29 for bug-gnu-emacs@gnu.org; Fri, 03 Jul 2015 07:34:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZAzEl-00010a-2D for bug-gnu-emacs@gnu.org; Fri, 03 Jul 2015 07:34:34 -0400 Received: from mail-wg0-x22d.google.com ([2a00:1450:400c:c00::22d]:35581) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAzEk-000107-QI for bug-gnu-emacs@gnu.org; Fri, 03 Jul 2015 07:34:30 -0400 Received: by wgjx7 with SMTP id x7so85975864wgj.2 for ; Fri, 03 Jul 2015 04:34:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:user-agent:mime-version :content-type; bh=EMrbgRAXrUNDbzLemju2YGUuRYYrL6bHwI+6Qae/ufY=; b=ApX4OE5dmowVBQPEnVasbL7bf7d5SuBCzSfQ4ysAaUxdsiuKbdThUf44joRn+tokmh vGRD72wmuiC9xHTxQ7Nwn7WEljBV39qU04LpLBQlyahjrQizM4rIJgsOpgXE1Zi86xlq 2BagN16FWJIkimNDuEkv9QTrymYeCBNTztGJC2yRLT9bep07wKCl1ii7F+oUE+BTuJNE hnR7M5u8R/T6aENhxt6L/v18BmEJ5ym0nP7nsba9q8xpPCynmQk0MV9w+urrTezbyLT5 QtSVyJpO2yo93yN0yCW1pdcssxpsrepwjP8EVRieRNclzwQFn+denWe5iFgc1eU1wud6 KWaA== X-Received: by 10.180.91.76 with SMTP id cc12mr65941637wib.67.1435923268879; Fri, 03 Jul 2015 04:34:28 -0700 (PDT) Received: from nb-jtatarik2 ([95.90.251.132]) by mx.google.com with ESMTPSA id fb3sm32082369wib.21.2015.07.03.04.34.27 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 03 Jul 2015 04:34:28 -0700 (PDT) From: Jan Tatarik To: bug-gnu-emacs@gnu.org Subject: 25.0.50; eieio-persistent broken Date: Fri, 03 Jul 2015 13:34:22 +0200 Message-ID: <874mlltqyp.fsf@xing.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -4.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: -4.0 (----) The commit a0010db41ca83a8211162b649e679162dd4153a6 has broken eieio persistence. Besides my own stuff, it affects gnus registry - just lost my registry file, because gnus couldn't read the registry file, so it created a new, empty one... I found three issues, the recipe can be reproduced with emacs -Q: (require 'eieio) (require 'eieio-base) (defclass test-persist (eieio-persistent) ((slot :initarg :slot :type string)) "Test class.") ;; In theory, calling it like this should override the :file slot ;; defined in eieio-persistent (eieio-persistent-save (test-persist :slot "foo") "/tmp/test.eieio") ;; But when no :file has been specified, it breaks ;; Debugger entered--Lisp error: (unbound-slot test-persist "#" file oref) ;; with explicit :file it works (eieio-persistent-save (test-persist :file "/tmp/test.eieio" :slot "foo")) ;; But this stores the file in :file, no override takes place, contrary to the docs (eieio-persistent-save (test-persist :file "/tmp/test.eieio" :slot "foo") "/tmp/another_file.eieio") ;; And finally, the most important issue - we cannot read the files back in (eieio-persistent-read "/tmp/test.eieio") ;; Debugger entered--Lisp error: (wrong-type-argument arrayp test-persist) The first two issues (if they are issues), must have been already present for some time. The eieio-persistent-read was caused by the latest changes to eieio (tested with 8bab1490f14207eeeee4b2f4ad30b5d695db8245 and it still worked). From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 03 11:29:46 2015 Received: (at 20972) by debbugs.gnu.org; 3 Jul 2015 15:29:46 +0000 Received: from localhost ([127.0.0.1]:38861 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZB2uQ-0006Ho-1v for submit@debbugs.gnu.org; Fri, 03 Jul 2015 11:29:46 -0400 Received: from mercure.iro.umontreal.ca ([132.204.24.67]:42709) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZB2uO-0006Hh-Ke for 20972@debbugs.gnu.org; Fri, 03 Jul 2015 11:29:44 -0400 Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id 562469C189; Fri, 3 Jul 2015 11:29:44 -0400 (EDT) Received: from lechon.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id 59A7E1E5B94; Fri, 3 Jul 2015 11:29:20 -0400 (EDT) Received: by lechon.iro.umontreal.ca (Postfix, from userid 20848) id A90A0B41D6; Fri, 3 Jul 2015 11:28:16 -0400 (EDT) From: Stefan Monnier To: Jan Tatarik Subject: Re: bug#20972: 25.0.50; eieio-persistent broken Message-ID: References: <874mlltqyp.fsf@xing.com> Date: Fri, 03 Jul 2015 11:28:16 -0400 In-Reply-To: <874mlltqyp.fsf@xing.com> (Jan Tatarik's message of "Fri, 03 Jul 2015 13:34:22 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-2.82, requis 5, autolearn=not spam, ALL_TRUSTED -2.82, MC_TSTLAST 0.00) X-DIRO-MailScanner-From: monnier@iro.umontreal.ca X-Spam-Status: No X-Spam-Score: -2.9 (--) X-Debbugs-Envelope-To: 20972 Cc: 20972@debbugs.gnu.org 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: -2.9 (--) > The commit a0010db41ca83a8211162b649e679162dd4153a6 has broken eieio > persistence. After a0010db41ca83a8211162b649e679162dd4153a6, eieio-base.el needs to be recompiled (even though it hasn't changed). If "grep eieio-class-definition **/*.elc" finds a match in eieio-base.elc, then please "rm eieio-base.elc" and try again. > The first two issues (if they are issues), must have been already > present for some time. Do you have a rough idea of when it worked? Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 03 13:07:12 2015 Received: (at control) by debbugs.gnu.org; 3 Jul 2015 17:07:13 +0000 Received: from localhost ([127.0.0.1]:38921 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZB4Qi-0008WS-Gn for submit@debbugs.gnu.org; Fri, 03 Jul 2015 13:07:12 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38336) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZB4Qg-0008WE-R4 for control@debbugs.gnu.org; Fri, 03 Jul 2015 13:07:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZB4Qa-0000OH-KC for control@debbugs.gnu.org; Fri, 03 Jul 2015 13:07:05 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:49136) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZB4Qa-0000OD-Am for control@debbugs.gnu.org; Fri, 03 Jul 2015 13:07:04 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1ZB4QZ-0008TM-Fn for control@debbugs.gnu.org; Fri, 03 Jul 2015 13:07:03 -0400 Subject: control message for bug 19759 To: X-Mailer: mail (GNU Mailutils 2.99.98) Message-Id: From: Glenn Morris Date: Fri, 03 Jul 2015 13:07:03 -0400 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.6 (-----) X-Debbugs-Envelope-To: control 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.6 (-----) block 19759 by 20972 From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 04 15:16:44 2015 Received: (at 20972) by debbugs.gnu.org; 4 Jul 2015 19:16:44 +0000 Received: from localhost ([127.0.0.1]:39959 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZBSva-00054W-A2 for submit@debbugs.gnu.org; Sat, 04 Jul 2015 15:16:44 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:47195) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZBSvY-00054M-Vv for 20972@debbugs.gnu.org; Sat, 04 Jul 2015 15:16:41 -0400 Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id t64JGbM3007155; Sat, 4 Jul 2015 15:16:38 -0400 Received: by ceviche.home (Postfix, from userid 20848) id B9D3F660ED; Sat, 4 Jul 2015 15:16:36 -0400 (EDT) From: Stefan Monnier To: Jan Tatarik Subject: Re: bug#20972: 25.0.50; eieio-persistent broken Message-ID: References: <874mlltqyp.fsf@xing.com> Date: Sat, 04 Jul 2015 15:16:36 -0400 In-Reply-To: <874mlltqyp.fsf@xing.com> (Jan Tatarik's message of "Fri, 03 Jul 2015 13:34:22 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5357=0 X-NAI-Spam-Version: 2.3.0.9393 : core <5357> : inlines <3321> : streams <1466264> : uri <1976603> X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 20972 Cc: 20972@debbugs.gnu.org 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: -1.9 (-) > ;; In theory, calling it like this should override the :file slot > ;; defined in eieio-persistent > (eieio-persistent-save (test-persist :slot "foo") "/tmp/test.eieio") Indeed, the code seems completely broken in this respect (it mostly ignores the `file' argument, tho not completely). I'm not 100% sure what the code *should* do, but can you try the patch below for you use case and confirm that it does the right thing for you? Stefan diff --git a/lisp/emacs-lisp/eieio-base.el b/lisp/emacs-lisp/eieio-base.el index 2e28036..400bdb9 100644 --- a/lisp/emacs-lisp/eieio-base.el +++ b/lisp/emacs-lisp/eieio-base.el @@ -429,37 +429,28 @@ Optional argument COMMENT is a header line comment." "Save persistent object THIS to disk. Optional argument FILE overrides the file name specified in the object instance." - (save-excursion - (let ((b (set-buffer (get-buffer-create " *tmp object write*"))) - (default-directory (file-name-directory (oref this file))) - (cfn (oref this file))) - (unwind-protect - (save-excursion - (erase-buffer) - (let ((standard-output (current-buffer))) - (oset this file - (if file - (eieio-persistent-path-relative this file) - (file-name-nondirectory cfn))) - (object-write this (oref this file-header-line))) - (let ((backup-inhibited (not (oref this do-backups))) - (cs (car (find-coding-systems-region - (point-min) (point-max))))) - (unless (eq cs 'undecided) - (setq buffer-file-coding-system cs)) - ;; Old way - write file. Leaves message behind. - ;;(write-file cfn nil) - - ;; New way - Avoid the vast quantities of error checking - ;; just so I can get at the special flags that disable - ;; displaying random messages. - (write-region (point-min) (point-max) - cfn nil 1) - )) - ;; Restore :file, and kill the tmp buffer - (oset this file cfn) - (setq buffer-file-name nil) - (kill-buffer b))))) + (when file (setq file (expand-file-name file))) + (with-temp-buffer + (let* ((cfn (or file (oref this file))) + (default-directory (file-name-directory cfn))) + (cl-letf ((standard-output (current-buffer)) + ((oref this file) ;FIXME: Why change it? + (if file + ;; FIXME: Makes a name relative to (oref this file), + ;; whereas I think it should be relative to cfn. + (eieio-persistent-path-relative this file) + (file-name-nondirectory cfn)))) + (object-write this (oref this file-header-line))) + (let ((backup-inhibited (not (oref this do-backups))) + (coding-system-for-write 'utf-8-emacs)) + ;; Old way - write file. Leaves message behind. + ;;(write-file cfn nil) + + ;; New way - Avoid the vast quantities of error checking + ;; just so I can get at the special flags that disable + ;; displaying random messages. + (write-region (point-min) (point-max) cfn nil 1) + )))) ;; Notes on the persistent object: ;; It should also set up some hooks to help it keep itself up to date. From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 06 11:56:55 2015 Received: (at 20972-done) by debbugs.gnu.org; 6 Jul 2015 15:56:55 +0000 Received: from localhost ([127.0.0.1]:42307 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZC8lJ-00067l-UB for submit@debbugs.gnu.org; Mon, 06 Jul 2015 11:56:54 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:43515) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZC8lH-00067b-01 for 20972-done@debbugs.gnu.org; Mon, 06 Jul 2015 11:56:51 -0400 Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id t66FunbD001815; Mon, 6 Jul 2015 11:56:49 -0400 Received: by ceviche.home (Postfix, from userid 20848) id C72B86619D; Mon, 6 Jul 2015 11:56:49 -0400 (EDT) From: Stefan Monnier To: Jan Tatarik Subject: Re: bug#20972: 25.0.50; eieio-persistent broken Message-ID: References: <874mlltqyp.fsf@xing.com> <87wpyd7lfz.fsf@xing.com> Date: Mon, 06 Jul 2015 11:56:49 -0400 In-Reply-To: <87wpyd7lfz.fsf@xing.com> (Jan Tatarik's message of "Mon, 06 Jul 2015 10:13:36 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5359=0 X-NAI-Spam-Version: 2.3.0.9393 : core <5359> : inlines <3325> : streams <1467268> : uri <1977865> X-Spam-Score: -2.0 (--) X-Debbugs-Envelope-To: 20972-done Cc: 20972-done@debbugs.gnu.org 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: -2.0 (--) [ Please keep the "Cc:". ] >> I'm not 100% sure what the code *should* do, but can you try the patch >> below for you use case and confirm that it does the right thing for you? > Yes, this works fine, thanks. Thanks for confirming. Installed into "master". Stefan From unknown Sun Jun 22 17:11:23 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 04 Aug 2015 11:24:05 +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