all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jan Tatarik <jan.tatarik@gmail.com>
To: 20972@debbugs.gnu.org
Subject: bug#20972: 25.0.50; eieio-persistent broken
Date: Fri, 03 Jul 2015 13:34:22 +0200	[thread overview]
Message-ID: <874mlltqyp.fsf@xing.com> (raw)

The commit a0010db41ca83a8211162b649e679162dd4153a6 has broken eieio
persistence.

Besides my own stuff, it affects gnus registry - just lost my registry
file, because gnus couldn't read the registry file, so it created a new,
empty one...

I found three issues, the recipe can be reproduced with emacs -Q:

(require 'eieio)
(require 'eieio-base)

(defclass test-persist (eieio-persistent)
  ((slot :initarg :slot :type string))
  "Test class.")

;; In theory, calling it like this should override the :file slot
;; defined in eieio-persistent
(eieio-persistent-save (test-persist :slot "foo") "/tmp/test.eieio")

;; But when no :file has been specified, it breaks
;; Debugger entered--Lisp error: (unbound-slot test-persist "#<test-persist test-persist>" file oref)

;; with explicit :file it works
(eieio-persistent-save (test-persist :file "/tmp/test.eieio" :slot "foo"))

;; But this stores the file in :file, no override takes place, contrary to the docs
(eieio-persistent-save (test-persist :file "/tmp/test.eieio" :slot "foo")
                        "/tmp/another_file.eieio")


;; And finally, the most important issue - we cannot read the files back in
(eieio-persistent-read "/tmp/test.eieio")
;; Debugger entered--Lisp error: (wrong-type-argument arrayp test-persist)


The first two issues (if they are issues), must have been already
present for some time.

The eieio-persistent-read was caused by the latest changes to eieio
(tested with 8bab1490f14207eeeee4b2f4ad30b5d695db8245 and it still
worked).





             reply	other threads:[~2015-07-03 11:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-03 11:34 Jan Tatarik [this message]
2015-07-03 15:28 ` bug#20972: 25.0.50; eieio-persistent broken Stefan Monnier
2015-07-04 19:16 ` Stefan Monnier
     [not found]   ` <87wpyd7lfz.fsf@xing.com>
2015-07-06 15:56     ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874mlltqyp.fsf@xing.com \
    --to=jan.tatarik@gmail.com \
    --cc=20972@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.