[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#28489: Acknowledgement (27.0.50; eieio-persistent slot type validati
From: |
Noam Postavsky |
Subject: |
bug#28489: Acknowledgement (27.0.50; eieio-persistent slot type validation should be a bit smarter) |
Date: |
Sat, 30 Sep 2017 17:58:54 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.60 (gnu/linux) |
Eric Abrahamsen <eric@ericabrahamsen.net> 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').
> * 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.
> +(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))))
- bug#28489: 27.0.50; eieio-persistent slot type validation should be a bit smarter, Eric Abrahamsen, 2017/09/17
- Message not available
- bug#28489: Acknowledgement (27.0.50; eieio-persistent slot type validation should be a bit smarter), Eric Abrahamsen, 2017/09/26
- bug#28489: Acknowledgement (27.0.50; eieio-persistent slot type validation should be a bit smarter), Noam Postavsky, 2017/09/26
- bug#28489: Acknowledgement (27.0.50; eieio-persistent slot type validation should be a bit smarter), Eric Abrahamsen, 2017/09/27
- bug#28489: Acknowledgement (27.0.50; eieio-persistent slot type validation should be a bit smarter), Noam Postavsky, 2017/09/27
- bug#28489: Acknowledgement (27.0.50; eieio-persistent slot type validation should be a bit smarter), Eric Abrahamsen, 2017/09/28
- bug#28489: Acknowledgement (27.0.50; eieio-persistent slot type validation should be a bit smarter), Noam Postavsky, 2017/09/28
- bug#28489: Acknowledgement (27.0.50; eieio-persistent slot type validation should be a bit smarter), Eric Abrahamsen, 2017/09/29
- bug#28489: Acknowledgement (27.0.50; eieio-persistent slot type validation should be a bit smarter), Noam Postavsky, 2017/09/29
- bug#28489: Acknowledgement (27.0.50; eieio-persistent slot type validation should be a bit smarter), Eric Abrahamsen, 2017/09/30
- bug#28489: Acknowledgement (27.0.50; eieio-persistent slot type validation should be a bit smarter),
Noam Postavsky <=
- bug#28489: Acknowledgement (27.0.50; eieio-persistent slot type validation should be a bit smarter), Eric Abrahamsen, 2017/09/30