GNU bug report logs - #29220
26.0.90; eieio-persistent-read fail to restore saved object.

Previous Next

Package: emacs;

Reported by: pierre.techoueyres <at> free.fr (Pierre Téchoueyres)

Date: Wed, 8 Nov 2017 22:20:01 UTC

Severity: normal

Merged with 33441

Found in version 26.0.90

Full log


Message #144 received at 29220 <at> debbugs.gnu.org (full text, mbox):

From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 29220 <at> debbugs.gnu.org, Noam Postavsky <npostavs <at> users.sourceforge.net>,
 Pierre Téchoueyres <pierre.techoueyres <at> free.fr>
Subject: Re: bug#29220: 26.0.90;
 eieio-persistent-read fail to restore saved object.
Date: Wed, 20 Dec 2017 10:29:09 -0800
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>> My feeling is that we could just remove the addition of the quote
>> character in `eieio-list-prin1'.
>
> Maybe it's needed to distinguish the printed value of "a list that
> starts with the symbol `my-class`" from "an object of class` my-class`"?

Yup.

Clearly this has the potential to turn into a bigger mess. I just pushed
a branch to the repo called "fix/eieio-persistent", based off emacs-26.
I modified Pierre's patch to add more (failing) tests, and then added
another commit which fixes the easy error in handling the return value
of `eieio-persistent-slot-type-is-class-p'.

My feeling is that the process *ought* to be able to handle all the
failing test cases. But even if the issue of quoting is fixed, not all
the tests will pass, as the write/restore process doesn't descend into
lists.

As for the quoting thing, my current idea is to not add quotes to lists
when writing, then strip quotes on restore, if the car of the list is a
valid class symbol then try to restore an object, but wrap in
`condition-case' and return the plain list if an error is raised.

Seems pretty unlikely that someone would write a list that accidentally
happens to restore to a valid object.

Eric




This bug report was last modified 6 years and 15 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.