Hello!
I didn't get if the cl-prevalence project is still alive but maybe someone will need this patch:
--- serialization.lisp.orig 2009-08-28 21:04:00.624489057 +0400 +++ serialization.lisp 2009-08-28 21:16:44.758777912 +0400 @@ -475,6 +475,7 @@ (write-string " . " stream) (serialize-sexp-internal (slot-value object slot) stream serialization-state) - (write-string ")" stream)))) - (write-string " ) )" stream))))) + (write-string ")" stream))) + (princ " )" stream)) + (write-string " )" stream)))))
;;; Deserialize CLOS instances and Lisp primitives from the XML representation
Alexey Voznyuk wrote:
I didn't get if the cl-prevalence project is still alive
Yes, it is.
but maybe someone will need this patch:
What's the problem with the original code?
Thanks!
Leslie
Leslie P. Polzer wrote:
Alexey Voznyuk wrote: [snip]
ut maybe someone will need this patch:
What's the problem with the original code?
Serializing a standard object with no slots defined caused extra ")" added at the end.
For example, (defclass foo () ()). Invocation of (s-serialization::serialize-sexp-internal (make-instance 'foo) *standard-output* (s-serialization::make-serialization-state)) results something like (OBJECT 1 :CLASS COMMON-LISP-USER::FOO ) ) into the stream (notice the mismatched closing round bracket).
The patch should fix that issue.
Thanks!
Leslie
Alexey Voznyuk wrote:
Serializing a standard object with no slots defined caused extra ")"
added at the end.
Ah, thanks. I'm going to test and apply your patch within 1-2 weeks.
Leslie
Leslie P. Polzer wrote:
Alexey Voznyuk wrote:
Serializing a standard object with no slots defined caused extra ")"
added at the end.
Ah, thanks. I'm going to test and apply your patch within 1-2 weeks.
Ok, thank you.
I got my cl-prevalence version from http://common-lisp.net/project/cl-prevalence/. So I better switch to the http://bitbucket.org/skypher/cl-prevalence/ repository now, right?
Leslie
swizard wrote:
I got my cl-prevalence version from
http://common-lisp.net/project/cl-prevalence/. So I better switch to the http://bitbucket.org/skypher/cl-prevalence/ repository now, right?
Yes. I'm not sure yet what to do with the CVS repo, but I'll probably remove it from the page and let it phase out in favor of the Mercurial one.
If you have any more fixes please keep them coming and they will be part of the next release.
Leslie
Leslie P. Polzer wrote:
swizard wrote:
I got my cl-prevalence version from http://common-lisp.net/project/cl-prevalence/. So I better switch to the http://bitbucket.org/skypher/cl-prevalence/ repository now, right?
Yes. I'm not sure yet what to do with the CVS repo, but I'll probably remove it from the page and let it phase out in favor of the Mercurial one.
If you have any more fixes please keep them coming and they will be part of the next release.
I'm trying to integrate cl-prevalence in my current project, so I'm just fixing bugs I've encountered during my experiment. I will provide you patches if I find any more.
Leslie
Leslie P. Polzer wrote:
Alexey Voznyuk wrote:
Serializing a standard object with no slots defined caused extra ")" added at the end.
Ah, thanks. I'm going to test and apply your patch within 1-2 weeks.
Leslie
Please check also the following patch for (defmethod backup ((system guarded-prevalence-system) &key directory)
It simply doesn't work causing an error, the patch should fix it:
--- prevalence.lisp.orig 2009-08-30 02:00:42.000000000 +0400 +++ prevalence.lisp 2009-08-30 02:00:48.000000000 +0400 @@ -311,5 +311,5 @@ "Do a backup on a system controlled by a guard" (funcall (get-guard system) - #'(lambda () (call-next-method system directory)))) + #'(lambda () (call-next-method system :directory directory))))
(defmethod restore ((system guarded-prevalence-system))
cl-prevalence-devel@common-lisp.net