From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs 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 Message-ID: <87a81betlt.fsf@users.sourceforge.net> References: <87lglcn8dt.fsf@ericabrahamsen.net> <878th1i50l.fsf@ericabrahamsen.net> <87wp4lf1kq.fsf@users.sourceforge.net> <87ing4cd04.fsf@ericabrahamsen.net> <87h8vnftnx.fsf@users.sourceforge.net> <87zi9fxvnh.fsf@ericabrahamsen.net> <8760c2fike.fsf@users.sourceforge.net> <87vak16ybk.fsf@ericabrahamsen.net> <87r2updmvj.fsf@users.sourceforge.net> <87efqodptz.fsf@ericabrahamsen.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1506808818 9548 195.159.176.226 (30 Sep 2017 22:00:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 30 Sep 2017 22:00:18 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.60 (gnu/linux) Cc: 28489@debbugs.gnu.org To: Eric Abrahamsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 01 00:00: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 1dyPnv-0001mw-QS for geb-bug-gnu-emacs@m.gmane.org; Sun, 01 Oct 2017 00:00:12 +0200 Original-Received: from localhost ([::1]:40486 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dyPo1-0002aA-Ja for geb-bug-gnu-emacs@m.gmane.org; Sat, 30 Sep 2017 18:00:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42554) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dyPnq-0002W7-Sl for bug-gnu-emacs@gnu.org; Sat, 30 Sep 2017 18:00:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dyPnm-0004YL-UH for bug-gnu-emacs@gnu.org; Sat, 30 Sep 2017 18:00:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:32872) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dyPnm-0004Y9-QC for bug-gnu-emacs@gnu.org; Sat, 30 Sep 2017 18:00:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dyPnm-0001g4-GI for bug-gnu-emacs@gnu.org; Sat, 30 Sep 2017 18:00:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 Sep 2017 22:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28489 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 28489-submit@debbugs.gnu.org id=B28489.15068087446332 (code B ref 28489); Sat, 30 Sep 2017 22:00:02 +0000 Original-Received: (at 28489) by debbugs.gnu.org; 30 Sep 2017 21:59:04 +0000 Original-Received: from localhost ([127.0.0.1]:41553 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dyPmq-0001e3-3u for submit@debbugs.gnu.org; Sat, 30 Sep 2017 17:59:04 -0400 Original-Received: from mail-it0-f48.google.com ([209.85.214.48]:57212) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dyPmo-0001dX-Ac for 28489@debbugs.gnu.org; Sat, 30 Sep 2017 17:59:03 -0400 Original-Received: by mail-it0-f48.google.com with SMTP id g18so3447121itg.5 for <28489@debbugs.gnu.org>; Sat, 30 Sep 2017 14:59:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=JOl5MXI5bTT+XuCq2DPtcF40zWRvLz2yvUqhY2+byWI=; b=B3L3S+BMOpB80yZ3Xb04JdDSIh9R1yYi4fzn/dfNLuFspQgIFk3IlHZFQ3ShmCSBJJ Qu8nS9dmZSqpFnxiPPs5rymCh7CZDxKM/V7YcxzQcWj8Cy0rtjKjzsdm+Olpx44YQqim v/CKBScQDop5juQb3Y5Zbocz5UQRnDahWrrFL1myfuM0fHQh2kbWQ33fP6QxlJ+QU0f6 NVY3uRoscg7IanhvlzFx76RyutmwhrfzO1Ld/o4xjik6IPLT7qo0rV6siDo2RIN9ZANl /UzzEC65c+rnKXVLJ/XRLwRdfixqOUBoPepZLItSAhbN/q66SlHhcIjlqYYWQDkVafYt fdPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=JOl5MXI5bTT+XuCq2DPtcF40zWRvLz2yvUqhY2+byWI=; b=QSll6udIhNMYZt0FQsFOJWXEs2vQNBX3HGiXLHA7VQsCpGzTJJCz9jN6tbLxmNj2mY bafXCd8y5stUPH74/7sBc0t9B/Cybpn+g1CGQdGUq7FvQ9jAP5gJbqtRcvZaNrHDPd/q a6HGA9AA5LdO/c1MS1mBKdRe/tDs6brTwMUpoa+3kqrCfvDT5bLcdfcRsQJW3hHIcpNb 6+eDOlblxESdDSRtZ0AXctsuqc2hwZLJRoTfegySfDavN632Goc45+U6aTRRWBNAiy3P qdQuAbJCnvfFICnbi995camC7zavm9Bv1haQ0pjmh+UycGnmDP2uuhb65QaOcmiOA8u4 GaeA== X-Gm-Message-State: AMCzsaWTk69qJZX0EQrxDcKPq7v770DGoFPxHzuK7WLwjVg6XUd+SLoN mLqRraZ4C4/QnhRUnrfCShVjaA== X-Google-Smtp-Source: AOwi7QCBCxUKATj8Cq7ubdACKZIn1mmq4Lzd1nD8jyhLTNX8rJ5a6pecwn/UY00lBlX7NP2rHoZJ/Q== X-Received: by 10.36.179.8 with SMTP id e8mr14225399itf.58.1506808736363; Sat, 30 Sep 2017 14:58:56 -0700 (PDT) Original-Received: from zebian ([45.2.119.34]) by smtp.googlemail.com with ESMTPSA id g7sm3026931iob.64.2017.09.30.14.58.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 30 Sep 2017 14:58:55 -0700 (PDT) In-Reply-To: <87efqodptz.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Sat, 30 Sep 2017 11:05:44 -0700") 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:137716 Archived-At: Eric Abrahamsen 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))))