This repository has been archived by the owner on Jan 20, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 266
Support Scala 2.12 #724
Merged
Merged
Support Scala 2.12 #724
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
6ed856f
Remove scala 2.10 and add scala 2.12
e91ffe6
Bump versions of deps
473517d
Fix algebird related issues based on https://github.com/twitter/summi…
67d32fb
Fix finagle related compilation error
99fbe79
Fix ClientStoreLaws
0ab0998
Merge remote-tracking branch 'upstream/develop' into scala_2.12
856c9e1
Merge remote-tracking branch 'upstream/develop' into scala_2.12
68dcc4e
Merge remote-tracking branch 'upstream/develop' into scala_2.12
a6bd6e3
Bump scalding version
8a693b7
Rename TimeStamp.scala to Timestamp.scala and fix serialization of ti…
93d48ef
Remove usage of JavaConversions
4977e9b
Trying to fix travis scalacheck fail
8ac1b9a
Introduce ArbitraryWorkaround object
b860fb9
Bump scalding version
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
summingbird-core-test/src/main/scala/com/twitter/summingbird/ArbitraryWorkaround.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.twitter.summingbird | ||
|
||
import org.scalacheck.{ Arbitrary, Gen } | ||
|
||
/** | ||
* [[org.scalacheck.GenArities]] and [[org.scalacheck.ArbitraryArities]] classes from scalacheck | ||
* contains to many lambdas in the same file which leads to | ||
* bug with functions serialization in Scala 2.12: https://issues.scala-lang.org/browse/SI-10232 | ||
* | ||
* As a workaround this class contains overriden implicits for such cases. | ||
* Should be imported if you import [[Arbitrary]] class. | ||
* | ||
* ScalaCheck issue is tracked at https://github.com/rickynils/scalacheck/issues/342. | ||
*/ | ||
object ArbitraryWorkaround { | ||
implicit val f1: Arbitrary[Int => Int] = Arbitrary(Gen.const(x => x * 2)) | ||
implicit val f2: Arbitrary[Int => List[(Int, Int)]] = Arbitrary(Gen.const(x => List((x, x * 3)))) | ||
implicit val f3: Arbitrary[Int => Option[Int]] = Arbitrary(Gen.const(x => { | ||
if (x % 2 == 0) None else Some(x * 4) | ||
})) | ||
implicit val f4: Arbitrary[Int => List[Int]] = Arbitrary(Gen.const(x => List(x * 5))) | ||
implicit val f5: Arbitrary[((Int, (Int, Option[Int]))) => List[(Int, Int)]] = Arbitrary(Gen.const { | ||
case (x, (y, optZ)) => List((x, y), (x, optZ.getOrElse(42))) | ||
}) | ||
implicit val f6: Arbitrary[((Int, Int)) => List[(Int, Int)]] = Arbitrary(Gen.const(x => List(x, x))) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we delete these commented lines?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, we need to uncomment after each version bump. Deleting seems like a good way to keep making mima mistakes like the scalding one.