emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#29541: closed (27.0.50; Use generic function when restoring eieio-pe


From: GNU bug Tracking System
Subject: bug#29541: closed (27.0.50; Use generic function when restoring eieio-persistent, remove validation)
Date: Fri, 28 Aug 2020 15:25:02 +0000

Your message dated Fri, 28 Aug 2020 08:24:10 -0700
with message-id <87zh6eiyjp.fsf@ericabrahamsen.net>
and subject line Re: bug#29541: 27.0.50; Use generic function when restoring 
eieio-persistent, remove validation
has caused the debbugs.gnu.org bug report #29541,
regarding 27.0.50; Use generic function when restoring eieio-persistent, remove 
validation
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
29541: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=29541
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: 27.0.50; Use generic function when restoring eieio-persistent, remove validation Date: Sat, 02 Dec 2017 16:10:07 -0800
The attached patch is a proposal that would replace the function
`eieio-persistent-convert-list-to-object' with a generic method
`eieio-persistent-make-instance'. It also removes all slot validation in
the read process.

Considerations:

1. `object-write' is already a method. That means the writing process
can be overridden and customized, but the reading process can't, which
removes most of the benefit of being able to override the write. This
would allow "matching" methods for writing and reading.

2. This version checks *all* slot values, including all elements inside
lists, cons-cells, etc. The safety consideration is mostly removing text
properties (specifically the display property), and this version checks
exhaustively.

3. I removed slot validation because it complicates the restoration
process, and because all the validation will be done again, and done
better, by `cl-typep' in the `initialize-instance' process. There's not
much reason to have a "pre-check", as errors are raised in both cases.

4. This version goes slightly faster than the old one (admittedly,
probably just because it omits type-checking).

Persistence format isn't changed, so this should be backwards
compatible.

I suppose the removal of validation might not be welcome, but at least I
hope the function->generic change is acceptable.



In GNU Emacs 27.0.50 (build 13, x86_64-pc-linux-gnu, GTK+ Version 3.22.26)
 of 2017-11-30 built on slip
Repository revision: 3f3d98ee5851840228786390ee7dbf851d144eb8

Attachment: 0001-Replace-eieio-persistent-convert-list-to-object-with.patch
Description: Text Data


--- End Message ---
--- Begin Message --- Subject: Re: bug#29541: 27.0.50; Use generic function when restoring eieio-persistent, remove validation Date: Fri, 28 Aug 2020 08:24:10 -0700 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
On 08/28/20 16:18 PM, Lars Ingebrigtsen wrote:
> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> This was quite a while ago, and the original patch no longer applies.
>> I've done up the same changes as two separate patches: one removing
>> extra validation, and the other creating a generic function for
>> constructing eieio-persistent objects. All the tests pass.
>
> I've just skimmed the code, but it looks good to me.  I'd say just apply
> it and then see whether there is any fallout (but I don't expect there
> to be).

I've also used this with the gnus registry and EBDB, which should
exercise it fairly well. I'll push now.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]