Open elm- opened 9 years ago
@elm- I may have just ran into that. My current (massive) PR to teh 0.11.x branch includes a ListPickler.
You can (and should) do this in the meantime: https://github.com/scala/pickling/blob/wip/new-macro-implementation/core/src/main/scala/scala/pickling/pickler/Iterable.scala#L14-L15
+1
Still an issue, above link broken. Same file on 0.11.x: https://github.com/scala/pickling/blob/0.11.x/core/src/main/scala/scala/pickling/pickler/Iterable.scala
For the record, that references to 0.11.x which hasn't been released. If you've stumbled upon this issue, you'll need to release a new version locally with publishLocal
and change the scala version you want to use in project/Util.scala
.
We could also cut a release – @jsuereth WDYT? I'm happy to do it so long as it doesn't mess up any of your plans.
I switched to "org.scala-lang.modules" %% "scala-pickling" % "0.11.0-M2" because my code was crashing when trying to unpickle a List. Now I am getting hundreds of warnings:
Warning:(53, 55) method lookupPicklee in package internal is deprecated: Use currentRuntime.refRegistry.pickle.registerPicklee
instead
val elkKMUnpickled = eiKafkaMessage.bytes.unpickle[ControlTopicMessage]
Warning:(53, 55) class Ref in package refs is deprecated: Sharing is not guaranteed to be safe w/ all possible picklers.
val elkKMUnpickled = eiKafkaMessage.bytes.unpickle[ControlTopicMessage]
Warning:(53, 55) value refPicklerUnpickler in trait RefPicklers is deprecated: Sharing is not guaranteed to be safe w/ all possible picklers.
val elkKMUnpickled = eiKafkaMessage.bytes.unpickle[ControlTopicMessage]
......
I'm trying to pickle a more complex case class, (nested over 4 levels with Map's, List's and Case Objects based types). When using dynamic pickling the compilation fails with an out of memory error after several minutes, even with 8GB of memory. I used the static pickler to figure out where it fails, the problem are List types in the case classes. Therefore I tried to pickle a simple List[String], even there i get the following exception:
It's scala 2.11.6 with latest pickling.
Is this a known issue and if so, does a work around exist? I'm right now trying to write my own list pickler for the specific types to see if that helps.