scala / scala-dev

Scala 2 team issues. Not for user-facing bugs or directly actionable user-facing improvements. For build/test/infra and for longer-term planning and idea tracking. Our bug tracker is at https://github.com/scala/bug/issues
Apache License 2.0
130 stars 15 forks source link

recent 2.13.x broke SerializationStabilityTest in scala-parallel-collections #809

Closed SethTisue closed 2 years ago

SethTisue commented 2 years ago

this came up over at https://github.com/scala/community-build/pull/1564 which changes the Scala 2.13 SHA from scala/scala@3ed3e3f to scala/scala@e623b15

https://scala-ci.typesafe.com/job/scala-2.13.x-jdk11-integrate-community-build/3693/artifact/logs/scala-parallel-collections-build.log shows

[scala-parallel-collections] [info] Test scala.SerializationStabilityTest.testAll started
[scala-parallel-collections] [error] Test scala.SerializationStabilityTest.testAll failed: java.io.InvalidClassException: scala.collection.immutable.OldHashMap; local class incompatible: stream classdesc serialVersionUID = -2425602972438308285, local class serialVersionUID = -6733093582541111701, took 0.125 sec
[scala-parallel-collections] [error]     at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:689)
SethTisue commented 2 years ago

ohhhh... presumably this an expected consequence of https://github.com/scala/scala/pull/9976 and I just need to update the test

fyi @lrytz

lrytz commented 2 years ago

Mhm.. It means there are some serializable classes that don't define an explicit @SerialVersionUID. The correct fix would be to find those classes, see their computed SVUIDs (when using 2.13.8), and add an annotation with that specific value. This is what I did in the PR (first commit, https://github.com/scala/scala/pull/9976/commits/003dc97ed39361892563d2aeddb1c0e62cc49aa7).

SethTisue commented 2 years ago

oh okay, I'll do that.

SethTisue commented 2 years ago

PR https://github.com/scala/scala-parallel-collections/pull/220

SethTisue commented 2 years ago
[info] Report from the dbuild run for dbuild: 
...
[info] Project scala-parallel-collections--: SUCCESS (project rebuilt ok)