From b0d84f6663662cb20cc7535924903cd65a6b74b8 Mon Sep 17 00:00:00 2001 From: Adrien Lavoillotte Date: Wed, 22 Jun 2016 22:39:42 +0000 Subject: Eval: add Serializable to wrapping class Allows the compiled code to be executed remotely, e.g. using Apache Spark. Another option would be to make `wrapCodeInClass` (and `codeWrapperLineOffset`) `protected` instead of `private[this]`. Signed-off-by: Ruben Oanta RB_ID=844794 --- libraries/eval/Eval.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libraries/eval') diff --git a/libraries/eval/Eval.scala b/libraries/eval/Eval.scala index 8b03ec6..92329d3 100644 --- a/libraries/eval/Eval.scala +++ b/libraries/eval/Eval.scala @@ -299,7 +299,7 @@ class Eval(target: Option[File]) { * NB: If this method is changed, make sure `codeWrapperLineOffset` is correct. */ private[this] def wrapCodeInClass(className: String, code: String) = { - "class " + className + " extends (() => Any) {\n" + + "class " + className + " extends (() => Any) with java.io.Serializable {\n" + " def apply() = {\n" + code + "\n" + " }\n" + -- cgit v1.2.3