From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: pierre.techoueyres@free.fr (Pierre =?UTF-8?Q?T=C3=A9choueyres?=) Newsgroups: gmane.emacs.bugs Subject: bug#29220: 26.0.90; eieio-persistent-read fail to restore saved object. Date: Tue, 14 Nov 2017 23:30:04 +0100 Message-ID: <87inecwl1v.fsf@killashandra.ballybran.fr> References: <87y3nga0lv.fsf@killashandra.ballybran.fr> <87po8s8k02.fsf@ericabrahamsen.net> <87zi7udorn.fsf@killashandra.ballybran.fr> <8760aim2a5.fsf@ericabrahamsen.net> <87375j2tzd.fsf@users.sourceforge.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1510698681 22481 195.159.176.226 (14 Nov 2017 22:31:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 14 Nov 2017 22:31:21 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) Cc: Eric Abrahamsen , 29220@debbugs.gnu.org, Stefan Monnier To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Nov 14 23:31:16 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eEjjf-0005ZT-V0 for geb-bug-gnu-emacs@m.gmane.org; Tue, 14 Nov 2017 23:31:16 +0100 Original-Received: from localhost ([::1]:33817 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eEjjn-0002TM-5c for geb-bug-gnu-emacs@m.gmane.org; Tue, 14 Nov 2017 17:31:23 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44970) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eEjjX-0002RT-SP for bug-gnu-emacs@gnu.org; Tue, 14 Nov 2017 17:31:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eEjjT-0005jS-KX for bug-gnu-emacs@gnu.org; Tue, 14 Nov 2017 17:31:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:60272) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eEjjT-0005jE-Gh for bug-gnu-emacs@gnu.org; Tue, 14 Nov 2017 17:31:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eEjjT-0007Bh-40 for bug-gnu-emacs@gnu.org; Tue, 14 Nov 2017 17:31:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: pierre.techoueyres@free.fr (Pierre =?UTF-8?Q?T=C3=A9choueyres?=) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 14 Nov 2017 22:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29220 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 29220-submit@debbugs.gnu.org id=B29220.151069861227553 (code B ref 29220); Tue, 14 Nov 2017 22:31:02 +0000 Original-Received: (at 29220) by debbugs.gnu.org; 14 Nov 2017 22:30:12 +0000 Original-Received: from localhost ([127.0.0.1]:40715 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eEjie-0007AL-31 for submit@debbugs.gnu.org; Tue, 14 Nov 2017 17:30:12 -0500 Original-Received: from smtp4-g21.free.fr ([212.27.42.4]:41056) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eEjic-0007AB-23 for 29220@debbugs.gnu.org; Tue, 14 Nov 2017 17:30:10 -0500 Original-Received: from killashandra.ballybran.fr.free.fr (unknown [IPv6:2a01:e35:2e14:eab0:b51f:3dc7:7e03:942]) by smtp4-g21.free.fr (Postfix) with ESMTPS id E83A519F5A3; Tue, 14 Nov 2017 23:30:04 +0100 (CET) In-Reply-To: <87375j2tzd.fsf@users.sourceforge.net> (Noam Postavsky's message of "Sun, 12 Nov 2017 14:10:46 -0500") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:139906 Archived-At: Noam Postavsky writes: > Eric Abrahamsen writes: > >> pierre.techoueyres@free.fr (Pierre T=C3=A9choueyres) writes: >> >>> So here is the same sample completed. Sorry. >>> >>> ;;; -*- lexical-binding: t -*- >>> (require 'eieio) >>> (require 'eieio-base) >>> >>> (defclass eieio-fail (eieio-persistent eieio-named) >>> ((version :initarg :version :initform nil) >>> (version-constant :allocation :class) >>> (entries :initarg :entries :initform (make-hash-table)))) >> >> This problem isn't related to my changes: it looks like the source of >> the issue is the way the hash table is written, and the fact that one of >> its entries holds an EIEIO object. >> >> As far as I can tell, when the hash table is written with `prin1', the >> EIEIO object inside is also getting written with `prin1' instead of >> `object-write'. The `prin1' representation isn't readable, so the >> persistent read process chokes on it. >> >> The prin1 process for the hash table would have to detect that there's >> an object in there, and write it with `object-write'. >> >> I assume this used to work? There have been several changes to the >> printing process in Emacs 26, but I don't have a good grasp of the >> details -- hopefully Stefan or someone will chime in. > > Stefan isn't subscribed to the bug list, so you have to Cc him (which > I've now done). I note that adding (setq print-circle t) makes the > given recipe work. Unfortunately my receip is an incomplete subset of what pcache do with the objects and hash tables. And even with `print-circle' set to t, reading an pcache object still fail with emacs 26. I've put an branch (pte/emacs-26) on github (https://github.com/PierreTechoueyres/pcache.git) with some tests that you can launch with emacs-26 -batch -L . -l test/pcache-test.el -f ert-run-tests-batch-and-exit Ask if I could provide more info. Pierre