pickling
pickling copied to clipboard
Pickler generation fails for object
Hi, I'm trying to generate a pickler for an object graph. The compilation fails after a while, suggesting to use -Xlog-implicits to see why. After adding that option, this is part of the output (it repeats itself for quite a while):
[info] /Users/iravid/Development/bigpanda/correlation/src/main/scala/bigpanda/correlation/coordinator/snapshots/SnapshotManager.scala:70: genPickler is not a valid implicit value for scala.pickling.Pickler[bigpanda.correlation.algorithm.Algorithm.Snapshot] because:
[info] hasMatchingSymbol reported error: stepping aside: repeating itself
[info] Try(snapshot.pickle.value) match {
[info] ^
[info] /Users/iravid/Development/bigpanda/correlation/src/main/scala/bigpanda/correlation/coordinator/snapshots/SnapshotManager.scala:70: genPickler is not a valid implicit value for scala.pickling.Pickler[bigpanda.correlation.algorithm.Algorithm.Snapshot] because:
[info] hasMatchingSymbol reported error: stepping aside: repeating itself
[info] Try(snapshot.pickle.value) match {
[info] ^
[info] /Users/iravid/Development/bigpanda/correlation/src/main/scala/bigpanda/correlation/coordinator/snapshots/SnapshotManager.scala:70: genPickler is not a valid implicit value for scala.pickling.Pickler[bigpanda.correlation.algorithm.model.Config] because:
[info] hasMatchingSymbol reported error: stepping aside: repeating itself
[info] Try(snapshot.pickle.value) match {
[info] ^
[info] /Users/iravid/Development/bigpanda/correlation/src/main/scala/bigpanda/correlation/coordinator/snapshots/SnapshotManager.scala:70: genPickler is not a valid implicit value for scala.pickling.Pickler[bigpanda.correlation.algorithm.model.Config] because:
[info] hasMatchingSymbol reported error: stepping aside: repeating itself
[info] Try(snapshot.pickle.value) match {
[info] ^
[info] /Users/iravid/Development/bigpanda/correlation/src/main/scala/bigpanda/correlation/coordinator/snapshots/SnapshotManager.scala:70: genPickler is not a valid implicit value for scala.pickling.Pickler[bigpanda.correlation.algorithm.model.EntityTimeWindowsConfig] because:
[info] hasMatchingSymbol reported error: stepping aside: repeating itself
[info] Try(snapshot.pickle.value) match {
[info] ^
[info] /Users/iravid/Development/bigpanda/correlation/src/main/scala/bigpanda/correlation/coordinator/snapshots/SnapshotManager.scala:70: genPickler is not a valid implicit value for scala.pickling.Pickler[bigpanda.correlation.algorithm.model.EntityTimeWindowsConfig] because:
[info] hasMatchingSymbol reported error: stepping aside: repeating itself
[info] Try(snapshot.pickle.value) match {
[info] ^
[info] /Users/iravid/Development/bigpanda/correlation/src/main/scala/bigpanda/correlation/coordinator/snapshots/SnapshotManager.scala:70: genPickler is not a valid implicit value for scala.pickling.Pickler[scala.concurrent.duration.FiniteDuration] because:
[info] hasMatchingSymbol reported error: stepping aside: repeating itself
[info] Try(snapshot.pickle.value) match {
[info] ^
[info] /Users/iravid/Development/bigpanda/correlation/src/main/scala/bigpanda/correlation/coordinator/snapshots/SnapshotManager.scala:70: genPickler is not a valid implicit value for scala.pickling.Pickler[scala.concurrent.duration.FiniteDuration] because:
[info] hasMatchingSymbol reported error: stepping aside: repeating itself
[info] Try(snapshot.pickle.value) match {
[info] ^
[info] /Users/iravid/Development/bigpanda/correlation/src/main/scala/bigpanda/correlation/coordinator/snapshots/SnapshotManager.scala:70: genPickler is not a valid implicit value for scala.pickling.Pickler[Long] because:
[info] hasMatchingSymbol reported error: stepping aside: repeating itself
[info] Try(snapshot.pickle.value) match {
[info] ^
[info] /Users/iravid/Development/bigpanda/correlation/src/main/scala/bigpanda/correlation/coordinator/snapshots/SnapshotManager.scala:70: genPickler is not a valid implicit value for scala.pickling.Pickler[Long] because:
[info] hasMatchingSymbol reported error: stepping aside: there are other candidates
[info] Try(snapshot.pickle.value) match {
[info] ^
[info] /Users/iravid/Development/bigpanda/correlation/src/main/scala/bigpanda/correlation/coordinator/snapshots/SnapshotManager.scala:70: genPickler is not a valid implicit value for scala.pickling.Pickler[scala.concurrent.duration.TimeUnit] because:
[info] hasMatchingSymbol reported error: stepping aside: repeating itself
[info] Try(snapshot.pickle.value) match {
[info] ^
[info] /Users/iravid/Development/bigpanda/correlation/src/main/scala/bigpanda/correlation/coordinator/snapshots/SnapshotManager.scala:70: genPickler is not a valid implicit value for scala.pickling.Pickler[scala.concurrent.duration.TimeUnit] because:
[info] hasMatchingSymbol reported error: stepping aside: repeating itself
[info] Try(snapshot.pickle.value) match {
[info] ^
[info] /Users/iravid/Development/bigpanda/correlation/src/main/scala/bigpanda/correlation/coordinator/snapshots/SnapshotManager.scala:70: genPickler is not a valid implicit value for scala.pickling.Pickler[scala.concurrent.duration.TimeUnit] because:
[info] hasMatchingSymbol reported error: exception during macro expansion:
[info] scala.ScalaReflectionException: value MINUTES is not a type
[info] at scala.reflect.api.Symbols$SymbolApi$class.asType(Symbols.scala:183)
[info] at scala.reflect.internal.Symbols$SymbolContextApiImpl.asType(Symbols.scala:84)
[info] at scala.pickling.TypeAnalysis$$anonfun$whyNotClosed$1.apply(Macros.scala:27)
[info] at scala.pickling.TypeAnalysis$$anonfun$whyNotClosed$1.apply(Macros.scala:27)
[info] at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:252)
[info] at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:252)
[info] at scala.collection.immutable.List.foreach(List.scala:381)
[info] at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:252)
[info] at scala.collection.immutable.List.flatMap(List.scala:344)
[info] at scala.pickling.TypeAnalysis$class.whyNotClosed(Macros.scala:27)
[info] at scala.pickling.Compat$$anon$3.whyNotClosed(Compat.scala:19)
[info] at scala.pickling.TypeAnalysis$class.isClosed(Macros.scala:17)
[info] at scala.pickling.Compat$$anon$3.isClosed(Compat.scala:19)
[info] at scala.pickling.PicklerMacros$$anonfun$pickleLogic$1.apply(Macros.scala:301)
[info] at scala.pickling.PicklerMacros$$anonfun$pickleLogic$1.apply(Macros.scala:93)
[info] at scala.pickling.Macro.preferringAlternativeImplicits(Tools.scala:401)
[info] at scala.pickling.PicklerMacros$class.pickleLogic(Macros.scala:93)
[info] at scala.pickling.Compat$$anon$3.pickleLogic(Compat.scala:19)
[info] at scala.pickling.PicklerMacros$$anonfun$impl$2.apply(Macros.scala:342)
[info] at scala.pickling.PicklerMacros$$anonfun$impl$2.apply(Macros.scala:337)
[info] at scala.pickling.Macro.preferringAlternativeImplicits(Tools.scala:401)
[info] at scala.pickling.PicklerMacros$class.impl(Macros.scala:337)
[info] at scala.pickling.Compat$$anon$3.impl(Compat.scala:19)
[info] at scala.pickling.Compat$.PicklerMacros_impl(Compat.scala:20)
[info] Try(snapshot.pickle.value) match {
[info] ^
[info] /Users/iravid/Development/bigpanda/correlation/src/main/scala/bigpanda/correlation/coordinator/snapshots/SnapshotManager.scala:70: genPickler is not a valid implicit value for scala.pickling.Pickler[scala.concurrent.duration.TimeUnit] because:
[info] hasMatchingSymbol reported error: stepping aside: repeating itself
Would be happy to provide any more info if needed.
Did you ever resolve this? I have the same issue.
Nope, gave up on the library and adopted chill instead.
On 24 Feb 2016, 00:39 +0200, [email protected], wrote:
Did you ever resolve this? I have the same issue.
— Reply to this email directly orview it on GitHub(https://github.com/scala/pickling/issues/381#issuecomment-187946222).
Probably fixed in 0.11.x. Please, would you be so kind to share the code that produced this to add it as a test case? Scala pickling has been totally reworked it in the latest release.