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

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

bug#28489: Acknowledgement (27.0.50; eieio-persistent slot type validati


From: Eric Abrahamsen
Subject: bug#28489: Acknowledgement (27.0.50; eieio-persistent slot type validation should be a bit smarter)
Date: Sat, 30 Sep 2017 16:30:10 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.60 (gnu/linux)

Noam Postavsky <address@hidden> writes:

> Eric Abrahamsen <address@hidden> writes:
>
>> Here's the commit as it stands, seems to work fine. I'll let it mellow
>> for a while, and then commit to... emacs-26? Since it's technically a
>> bug fix?
>
> Yes.  You are missing a (require 'seq) in eieo-base.el though (without
> that, I get an error when running 'make -C test eieio-test-persist').

Thanks, done.

>> * lisp/emacs-lisp/eieio-base.el (eieio-persistent-slot-type-is-class-p):
>>   An `or' form can specify multiple potential classes (or null) as
>>   valid types for a slot, but previously only the final element of the
>>   `or' was actually checked. Now returns all valid classes in the `or'
>>   form.
>> * lisp/emacs-lisp/eieio-base.el (eieio-persistent-validate/fix-slot-value):
>>   Check if proposed value matches any of the valid classes.
>
> These 2 entries should be combined like:
>
> * lisp/emacs-lisp/eieio-base.el (eieio-persistent-slot-type-is-class-p):
> An `or' form can specify multiple potential classes (or null) as [...]
> (eieio-persistent-validate/fix-slot-value): Check if proposed value
> matches any of the valid classes.

Dunno how that happened...

>> +(ert-deftest eieio-test-multiple-class-slot ()
>> +  (let ((persist
>> +         (persistent-multiclass-slot "random string"
>> +          :slot1 (persistent-random-class)
>> +          :slot2 (persist-not-persistent)
>> +          :file (concat default-directory "test-ps5.pt"))))
>> +    (persist-test-save-and-compare persist)
>> +    (delete-file (oref persist file))))
>
> I think this test should a bit more thorough about deleting the file,
> even if the test fails for some reason:
>
> (unwind-protect
>     (persist-test-save-and-compare persist)
>   (ignore-errors (delete-file (oref persist file))))

Done -- at some point, the same should be done for the other tests.

Thanks,
Eric






reply via email to

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