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

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

bug#29220: 26.0.90; eieio-persistent-read fail to restore saved object.


From: Noam Postavsky
Subject: bug#29220: 26.0.90; eieio-persistent-read fail to restore saved object.
Date: Fri, 17 Nov 2017 22:40:58 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux)

Noam Postavsky <npostavs@users.sourceforge.net> writes:

> When I set a breakpoint in eieio-persistent-read, the object being seems
> correct.  If I evaluate (pcache-get ret 'foo) in edebug, I get 44, as
> expected.  But somehow the object which gets returned from
> (pcache-repository :object-name #1="pcache-test/tmp2") doesn't have
> anything in its hash table.

Okay, I found where the problem is, it's failing pcache-validate-repo
(what's the idea behind throwing an error which is caught and ignored
anyway?):

    (cl-defmethod make-instance ((cache (subclass pcache-repository)) &rest 
args)
      ...
                 (condition-case nil
                     (let* ((obj (eieio-persistent-read path 
'pcache-repository)))
                       (and (or (pcache-validate-repo obj)
                                (error "wrong version")) ...
                   (error nil)))

Specifically, this part:

    (defun pcache-validate-repo (cache)
       ...
       (cl-every
        (lambda (entry)
          (and (object-of-class-p entry (slot-value cache 'entry-cls))
               ...
        (pcache-hash-table-values (slot-value cache 'entries)))))

I can't really tell what this function is supposed to be checking.





reply via email to

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