Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added requiredBinarayComparators #1337

Closed
wants to merge 2 commits into from

Conversation

MansurAshraf
Copy link

No description provided.


object RequiredBinaryComparators {

implicit def ordSer[T]: OrderedSerialization[T] = macro com.twitter.scalding.serialization.macros.impl.OrderedSerializationProviderImpl[T]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we change the name of this to say, orderedSerialization? Scala has this issue (bug?) where if you have two implicits in scope of the same name you get issues:

scala> object Test { implicit val name: String = "object" }
defined module Test

scala> trait TestT { implicit val name: String = "trait" }
defined trait TestT

scala> class TestClass extends TestT { import Test._; println(implicitly[String]) }
<console>:9: error: could not find implicit value for parameter e: String
       class TestClass extends TestT { import Test._; println(implicitly[String]) }
                                                                        ^

scala> import Test._
import Test._

scala> class TestClass extends TestT { println(implicitly[String]) }
defined class TestClass

scala> new TestClass
trait
res0: TestClass = TestClass@20c9cd89

scala> class TestClass extends TestT { import Test._; println(implicitly[String]) }
<console>:12: error: could not find implicit value for parameter e: String
       class TestClass extends TestT { import Test._; println(implicitly[String]) }
                                                                        ^

scala> object Test2 { val name2: String = "Test2" }
defined module Test2

scala> class TestClass extends TestT { import Test2._; println(implicitly[String]) }
defined class TestClass

scala> new TestClass
trait
res1: TestClass = TestClass@3ba4236f

@johnynek
Copy link
Collaborator

merge when green

@MansurAshraf
Copy link
Author

closing this and moving the change to #1338 in order to use thrift macro

@johnynek
Copy link
Collaborator

PS: you wasted the 1337 PR. :( you could have been so leet!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants