From 1ca0994ee25494412a2b4ff0bb53ccd61a461d9a Mon Sep 17 00:00:00 2001 From: Alex Levenson Date: Fri, 22 Jan 2016 14:26:27 -0800 Subject: [PATCH 1/2] Update TypeDescriptor to explain that Option[String] is not supported --- .../src/main/scala/com/twitter/scalding/TypeDescriptor.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scalding-core/src/main/scala/com/twitter/scalding/TypeDescriptor.scala b/scalding-core/src/main/scala/com/twitter/scalding/TypeDescriptor.scala index 5ec10106af..dc97fdcce6 100644 --- a/scalding-core/src/main/scala/com/twitter/scalding/TypeDescriptor.scala +++ b/scalding-core/src/main/scala/com/twitter/scalding/TypeDescriptor.scala @@ -28,7 +28,7 @@ import scala.language.experimental.{ macros => sMacros } * Note in the com.twitter.scalding.macros package there are macros to * generate this for case classes, which may be very convenient. */ -@implicitNotFound("This class is used to bind together a Fields instance to an instance of type T. There is a implicit macro that generates a TypeDescriptor[T] for any type T where T is Boolean, String, Short, Int, Long, FLoat, or Double, or an option of these, or a tuple or case class of a supported type. (Nested tuples and case classes are allowed.) If your type T is not one of these, then you must write your own TypeDescriptor.") +@implicitNotFound("This class is used to bind together a Fields instance to an instance of type T. There is a implicit macro that generates a TypeDescriptor[T] for any type T where T is Boolean, String, Short, Int, Long, FLoat, or Double, or an option of these (with the exception of Option[String]), or a tuple or case class of a supported type. (Nested tuples and case classes are allowed.) Note: Option[String] specifically is not allowed as Some("") and None are indistinguishable. If your type T is not one of these, then you must write your own TypeDescriptor.") trait TypeDescriptor[T] extends java.io.Serializable { def setter: TupleSetter[T] def converter: TupleConverter[T] From a9941a875bb7eb055ed490c342129f4f59a3c55c Mon Sep 17 00:00:00 2001 From: Alex Levenson Date: Fri, 22 Jan 2016 15:43:36 -0800 Subject: [PATCH 2/2] Use triple quotes in message --- .../src/main/scala/com/twitter/scalding/TypeDescriptor.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scalding-core/src/main/scala/com/twitter/scalding/TypeDescriptor.scala b/scalding-core/src/main/scala/com/twitter/scalding/TypeDescriptor.scala index dc97fdcce6..6d09a18aca 100644 --- a/scalding-core/src/main/scala/com/twitter/scalding/TypeDescriptor.scala +++ b/scalding-core/src/main/scala/com/twitter/scalding/TypeDescriptor.scala @@ -28,7 +28,7 @@ import scala.language.experimental.{ macros => sMacros } * Note in the com.twitter.scalding.macros package there are macros to * generate this for case classes, which may be very convenient. */ -@implicitNotFound("This class is used to bind together a Fields instance to an instance of type T. There is a implicit macro that generates a TypeDescriptor[T] for any type T where T is Boolean, String, Short, Int, Long, FLoat, or Double, or an option of these (with the exception of Option[String]), or a tuple or case class of a supported type. (Nested tuples and case classes are allowed.) Note: Option[String] specifically is not allowed as Some("") and None are indistinguishable. If your type T is not one of these, then you must write your own TypeDescriptor.") +@implicitNotFound("""This class is used to bind together a Fields instance to an instance of type T. There is a implicit macro that generates a TypeDescriptor[T] for any type T where T is Boolean, String, Short, Int, Long, FLoat, or Double, or an option of these (with the exception of Option[String]), or a tuple or case class of a supported type. (Nested tuples and case classes are allowed.) Note: Option[String] specifically is not allowed as Some("") and None are indistinguishable. If your type T is not one of these, then you must write your own TypeDescriptor.""") trait TypeDescriptor[T] extends java.io.Serializable { def setter: TupleSetter[T] def converter: TupleConverter[T]