docs.scala-lang icon indicating copy to clipboard operation
docs.scala-lang copied to clipboard

Mention Java serialization compatibility?

Open henrikbarium opened this issue 7 years ago • 1 comments

Reading through Binary Compatibility of Scala Releases, it remains unclear whether there is any promise whether serialVersionUID will remain stable between Scala releases.

Specifically, if running and/or compiling an application on two different Scala versions (with same major version), will a Scala (case) class get the same serialVersionUID in both cases?

I do not know the answer to that question (though I know that it did change between Scala 2.12.6 and 2.12.7), but it would be helpful to know.

henrikbarium avatar Oct 31 '18 15:10 henrikbarium

see also @szeiger's remarks at https://github.com/scala/scala/pull/7171#issuecomment-435467159 👍

I'd be hesitant to add any guarantees around serialization compatibility because it will make it even harder to change anything in a compatible way in minor releases. Plus we'd first need tooling to check for incompatible changes, similar to what MiMa does for binary compatibility.

SethTisue avatar Nov 03 '18 17:11 SethTisue