clojure-dev

jumar 2022-03-29T15:05:20.256329Z

I just found a problem with Keyword deserialization (via Quartz) after upgrade to clojure 1.11.0: https://ask.clojure.org/index.php/11699/deserializing-upgrading-clojure-invalidclassexception Does anyone else noticed the same issue? Am I doing something wrong here?

😱 1
borkdude 2022-03-29T15:20:08.518199Z

@jumar Perhaps you're hitting the same issue as https://clojurians.slack.com/archives/C03S1KBA2/p1648037414353039 ?

jumar 2022-03-29T15:29:31.255859Z

@borkdude thanks for the link. I unfortunately expected something like this: > We do not guarantee binary serializability of Clojure objects between releases so the expectation here that these would be identical is incorrect. I'm still wondering why the Clojure classes, notably Keyword.java, don't provide custom serialVersionUID since it's a best practice and easy to update if things change in backward incompatible manner (which they didn't in this case).

borkdude 2022-03-29T15:29:53.638269Z

Talk to @alexmiller :)

borkdude 2022-03-29T15:30:02.489229Z

And @fogus

borkdude 2022-03-29T15:31:33.727279Z

I wonder why these problems appear after there have been several pre-releases. Not to blame you, but it would surely be a lot easier if these problems were caught and discussed pre-release. This change was already available September 2021.

Alex Miller (Clojure team) 2022-03-29T15:34:08.388109Z

@jumar I am working on addressing that in 1.12, but this has been the case approx forever

jumar 2022-03-29T15:34:09.685229Z

Yeah, I could do a better job with this - I typically don't test pre-releases on our production app only on my hobby projects Even with this, it was an edge case only caught by a manual tester.

jumar 2022-03-29T15:34:51.330119Z

I see, thanks 🙂 A silly request: could it be mentioned in release notes that this can break - or is it just too much to repeat this every time?

seancorfield 2022-03-29T15:48:03.811989Z

@jumar There is a reason we've run prerelease builds in production dating back to 1.3 alpha builds in 2011 🙂

👍 1
seancorfield 2022-03-29T15:49:41.294679Z

I will be honest and say that I have always shied away from binary serialization formats, in favor of text or near-text (that doesn't depend on versioning), for exactly this sort of reason. I think I got burned back in the '90s with C++-based stuff and never trusted it again 😕

👍 1
Alex Miller (Clojure team) 2022-03-29T15:50:52.461819Z

Having worked on Clojure since 1.6 and this is the first time I've seen people run into these serialization expectations. Although maybe it's because we rarely change types like Keyword

jumar 2022-03-29T15:52:38.028759Z

Yeah, it haven't changed for several years before that. At least, now I learned a lesson :)

Alex Miller (Clojure team) 2022-03-29T15:54:34.355649Z

I am still in the process of assessment on this