From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#29220: 26.0.90; eieio-persistent-read fail to restore saved object. Date: Wed, 29 Nov 2017 10:15:28 -0500 Message-ID: References: <87y3nga0lv.fsf@killashandra.ballybran.fr> <87po8s8k02.fsf@ericabrahamsen.net> <87zi7udorn.fsf@killashandra.ballybran.fr> <8760aim2a5.fsf@ericabrahamsen.net> <87375j2tzd.fsf@users.sourceforge.net> <87inecwl1v.fsf@killashandra.ballybran.fr> <87y3n81eq7.fsf@users.sourceforge.net> <87h8ts1cfp.fsf@users.sourceforge.net> <87zi7kyzcf.fsf@ericabrahamsen.net> <87efov1zzn.fsf@users.sourceforge.net> <87h8trzc6e.fsf@ericabrahamsen.net> <87bmjz0xez.fsf@users.sourceforge.net> <87zi7cpooo.fsf@killashandra.ballybran.fr> <87h8tkzgef.fsf@users.sourceforge.net> <87zi76f5hj.fsf@killashandra.ballybran.fr> <87shcycavk.fsf@ericabrahamsen.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1511968456 32429 195.159.176.226 (29 Nov 2017 15:14:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 29 Nov 2017 15:14:16 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 29220@debbugs.gnu.org, Pierre =?UTF-8?Q?T=C3=A9choueyres?= , Noam Postavsky To: Eric Abrahamsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Nov 29 16:14:12 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 1eK43u-00084c-Jn for geb-bug-gnu-emacs@m.gmane.org; Wed, 29 Nov 2017 16:14:10 +0100 Original-Received: from localhost ([::1]:43572 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eK441-0002cw-Oc for geb-bug-gnu-emacs@m.gmane.org; Wed, 29 Nov 2017 10:14:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50482) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eK43s-0002bp-N2 for bug-gnu-emacs@gnu.org; Wed, 29 Nov 2017 10:14:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eK43m-0008Dy-Ot for bug-gnu-emacs@gnu.org; Wed, 29 Nov 2017 10:14:08 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56708) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eK43m-0008Da-Jn for bug-gnu-emacs@gnu.org; Wed, 29 Nov 2017 10:14:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eK43m-0000qD-Da for bug-gnu-emacs@gnu.org; Wed, 29 Nov 2017 10:14:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 29 Nov 2017 15:14: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.15119684123185 (code B ref 29220); Wed, 29 Nov 2017 15:14:02 +0000 Original-Received: (at 29220) by debbugs.gnu.org; 29 Nov 2017 15:13:32 +0000 Original-Received: from localhost ([127.0.0.1]:37156 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eK43I-0000pJ-1B for submit@debbugs.gnu.org; Wed, 29 Nov 2017 10:13:32 -0500 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:41191) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eK43G-0000pB-3O for 29220@debbugs.gnu.org; Wed, 29 Nov 2017 10:13:30 -0500 Original-Received: from lechazo.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id vATFDT0b028976; Wed, 29 Nov 2017 10:13:29 -0500 Original-Received: by lechazo.home (Postfix, from userid 20848) id D86A060122; Wed, 29 Nov 2017 10:15:28 -0500 (EST) In-Reply-To: <87shcycavk.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Tue, 28 Nov 2017 14:10:55 -0800") X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6169=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6169> : inlines <6193> : streams <1771684> : uri <2542175> 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:140543 Archived-At: > That's exactly what Noam was saying! The implementation of objects > changed from 25 to 26, and thus their printed representation also > changed. Indeed. But the subject mentions "...eieio-persistent-read..." and eieio-persistent was designed specifically to try and avoid dependence on how Emacs represents EIEIO objects. The problem here is that eieio-persistent doesn't support hash-tables, so the EIEIO objects in the hash-tables are printed with `princ` (i.e. in all their internal glory) rather than going through eieio-persistent. So I think the real fix here is to extend eieio-persistent with support for hash-tables. > The real problem isn't that objects written with 25 can't be read by 26 > (I don't think that kind of compatibility is guaranteed), but that > objects written by 26 can't be read at all -- at least not when they're > written internally, as members of other objects. There are many different ways one might want to "print" objects, depending on the intention: - print for human consumption (i.e. eliding details to keep it concise). That's what cl-print aims for, for example (tho IIRC it doesn't support hash-tables either, so far). - print in a way that can be read back in the future (possibly far future, where some details of the internal representation have changed). This is what eieio-persistent aims for. - print in a way that can be read back, preserving as many of the details as possible. This is what `princ` aims for. In the case of EIEIO objects, I'm not completely satisfied with the result in Emacs-26, but I think I'd rather live with it for now to get time to better understand the design space&constraints before we improve it. -- Stefan