Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Scala 2.12 serialization of Props #22041
WIth Scala 2.12 the recommendation in http://doc.akka.io/docs/akka/2.4/scala/actors.html#Recommended_Practices doesn't work for remote deployment because Function is no longer serializable. It's translated to a lambda, which is not serializable. E.g. error message:
For actors that are to be remote deployed the class based
The generated lambdas are serializable if the requested SAM is. For scala.FunctionN, lambdas are always serializable. The problem we are seeing here is that the lambda is serialized as the top level object and for that we try to load the class with the generated lambda name. It works if I wrap the function in another Serializable class, e.g.
case class Foo(fun: Function1[Int, Int])
We might be able to use that trick for the