Skip to content

Drop Scala 2.10 support #42

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

Merged
merged 1 commit into from
Jul 28, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ env:
script:
- admin/build.sh
scala:
- 2.10.4
- 2.11.5
- 2.11.6
jdk:
- oraclejdk8
notifications:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## scala-java8-compat [<img src="https://api.travis-ci.org/scala/scala-java8-compat.png"/>](https://travis-ci.org/scala/scala-java8-compat) [<img src="https://img.shields.io/maven-central/v/org.scala-lang.modules/scala-java8-compat_2.10.svg?label=latest%20release%20for%202.10"/>](http://search.maven.org/#search%7Cga%7C1%7Cg%3Aorg.scala-lang.modules%20a%3Ascala-java8-compat_2.10) [<img src="https://img.shields.io/maven-central/v/org.scala-lang.modules/scala-java8-compat_2.11*.svg?label=latest%20release%20for%202.11"/>](http://search.maven.org/#search%7Cga%7C1%7Cg%3Aorg.scala-lang.modules%20a%3Ascala-java8-compat_2.11*)
## scala-java8-compat [<img src="https://img.shields.io/maven-central/v/org.scala-lang.modules/scala-java8-compat_2.11*.svg?label=latest%20release%20for%202.11"/>](http://search.maven.org/#search%7Cga%7C1%7Cg%3Aorg.scala-lang.modules%20a%3Ascala-java8-compat_2.11*)

A Java 8 compatibility kit for Scala.

Expand Down
35 changes: 2 additions & 33 deletions project/CodeGen.scala
Original file line number Diff line number Diff line change
Expand Up @@ -331,26 +331,9 @@ object CodeGen {
|}
|""".stripMargin.trim
}
// andThen / compose variants are no longer needed under 2.11 (@unspecialized has been fixed),
// but harmless. With them, we can use the same artifact for 2.10 and 2.11
val compose = specialized("compose", function1Spec) {
case (name, List(t1, r1)) =>
s"""
|default scala.Function1 $name(scala.Function1 g) {
| return compose(g);
|}""".stripMargin.trim
}
val andThen = specialized("andThen", function1Spec) {
case (name, List(t1, r1)) =>
s"""
|default scala.Function1 $name(scala.Function1 g) {
| return andThen(g);
|}""".stripMargin.trim
}
indent(List(apply, compose, andThen).mkString("\n\n"))
indent(List(apply).mkString("\n\n"))
}

// No longer needed under 2.11 (@unspecialized has been fixed), but harmless to keep around to avoid cross-publishing this artifact.
private def function2SpecMethods = {
val apply = specialized("apply", function2Spec) {
case (name, List(t1, t2, r)) =>
Expand All @@ -363,21 +346,7 @@ object CodeGen {
|}
|""".stripMargin.trim
}
val curried = specialized("curried", function2Spec) {
case (name, List(t1, t2, r)) =>
s"""
|default scala.Function1 $name() {
| return curried();
|}""".stripMargin.trim
}
val tupled = specialized("tupled", function2Spec) {
case (name, List(t1, t2, r)) =>
s"""
|default scala.Function1 $name() {
| return tupled();
|}""".stripMargin.trim
}
indent(List(apply, curried, tupled).mkString("\n\n"))
indent(List(apply).mkString("\n\n"))
}

def specializedSuffix(tparamNames: List[String], tps: List[Type]): String = {
Expand Down