Skip to content

Commit

Permalink
Switch to Java 8 and Scala 2.11
Browse files Browse the repository at this point in the history
Problem

Its time to drop support for Java 7 and Scala 2.10 as per the blog
post [1].

Solution

Update sbt builds.

[1] https://finagle.github.io/blog/2016/04/20/scala-210-and-java7/

RB_ID=828898
  • Loading branch information
kevinoliver authored and jenkins committed May 9, 2016
1 parent 4caf789 commit d832ef5
Show file tree
Hide file tree
Showing 12 changed files with 33 additions and 45 deletions.
7 changes: 1 addition & 6 deletions .travis.yml
Expand Up @@ -15,15 +15,10 @@ cache:
- $HOME/.gitshas

scala:
- 2.10.6
- 2.11.7
- 2.11.8

jdk:
- oraclejdk7
# Note: not currently testing on JDK 8 internally
- oraclejdk8
# Enable once https://github.com/travis-ci/travis-ci/issues/5227 is fixed.
#- openjdk7

notifications:
hipchat:
Expand Down
11 changes: 9 additions & 2 deletions CHANGES
Expand Up @@ -10,8 +10,8 @@ Note that ``RB_ID=#`` correspond to associated messages in commits.
Bug Fixes
~~~~~~~~~

* finagle-http: Servers which aggregate content chunks (streaming == false) now return a 413
response for streaming clients who exceed the servers' configured max request size.
* finagle-http: Servers which aggregate content chunks (streaming == false) now return a 413
response for streaming clients who exceed the servers' configured max request size.
``RB_ID=828741``

New Features
Expand All @@ -22,6 +22,13 @@ New Features
operations on threads that have opted into tracking. This also moves the
"scheduler/dispatches" gauge out of TwitterServer into Finagle. ``RB_ID=828289``

Breaking API Changes
~~~~~~~~~~~~~~~~~~~~

* Builds are now only for Java 8 and Scala 2.11. See the
`blog post <https://finagle.github.io/blog/2016/04/20/scala-210-and-java7/>`_
for details. ``RB_ID=828898``

6.35.0
------

Expand Down
1 change: 0 additions & 1 deletion bin/travisci
Expand Up @@ -84,4 +84,3 @@ if [ "$FINAGLE_BRANCH" != "master" ]; then
cd $FINAGLE_DIR
rm -rf $FINAGLE_TMP_DIR
fi

2 changes: 1 addition & 1 deletion doc/src/sphinx/code/client-server-anatomy/build.sbt
Expand Up @@ -2,7 +2,7 @@ name := "client-server-anatomy"

version := "1.0"

scalaVersion := "2.11.7"
scalaVersion := "2.11.8"

libraryDependencies ++= Seq(
"com.twitter" %% "finagle-core" % "6.35.0"
Expand Down
1 change: 0 additions & 1 deletion doc/src/sphinx/code/client-server-anatomy/sbt
Expand Up @@ -31,7 +31,6 @@ java -ea \
-XX:+CMSParallelRemarkEnabled \
-XX:+CMSClassUnloadingEnabled \
-XX:ReservedCodeCacheSize=128m \
-XX:MaxPermSize=1024m \
-XX:SurvivorRatio=128 \
-XX:MaxTenuringThreshold=0 \
-Xss8M \
Expand Down
2 changes: 1 addition & 1 deletion doc/src/sphinx/code/protocols/build.sbt
Expand Up @@ -2,7 +2,7 @@ name := "protocols"

version := "1.0"

scalaVersion := "2.11.7"
scalaVersion := "2.11.8"

libraryDependencies ++= Seq(
"com.twitter" %% "finagle-mysql" % "6.35.0"
Expand Down
1 change: 0 additions & 1 deletion doc/src/sphinx/code/protocols/sbt
Expand Up @@ -31,7 +31,6 @@ java -ea \
-XX:+CMSParallelRemarkEnabled \
-XX:+CMSClassUnloadingEnabled \
-XX:ReservedCodeCacheSize=128m \
-XX:MaxPermSize=1024m \
-XX:SurvivorRatio=128 \
-XX:MaxTenuringThreshold=0 \
-Xss8M \
Expand Down
2 changes: 1 addition & 1 deletion doc/src/sphinx/code/quickstart/build.sbt
Expand Up @@ -2,6 +2,6 @@ name := "quickstart"

version := "1.0"

scalaVersion := "2.11.7"
scalaVersion := "2.11.8"

libraryDependencies += "com.twitter" %% "finagle-http" % "6.35.0"
1 change: 0 additions & 1 deletion doc/src/sphinx/code/quickstart/sbt
Expand Up @@ -31,7 +31,6 @@ java -ea \
-XX:+CMSParallelRemarkEnabled \
-XX:+CMSClassUnloadingEnabled \
-XX:ReservedCodeCacheSize=128m \
-XX:MaxPermSize=1024m \
-XX:SurvivorRatio=128 \
-XX:MaxTenuringThreshold=0 \
-Xss8M \
Expand Down
42 changes: 14 additions & 28 deletions project/Build.scala
Expand Up @@ -51,28 +51,10 @@ object Finagle extends Build {
ExclusionRule(organization = "org.scala-tools.testing"),
ExclusionRule(organization = "org.mockito"))

def scalacOptionsVersion(sv: String): Seq[String] = {
Seq(
// Note: Add -deprecation when deprecated methods are removed
"-unchecked",
"-feature",
"-language:_",
"-encoding", "utf8"
) ++ (CrossVersion.partialVersion(sv) match {
case Some((2, x)) if x >= 11 =>
Seq(
"-Xlint:-missing-interpolator",
"-Ypatmat-exhaust-depth", "40"
)
case _ => Seq("-Xlint")
})
}

val sharedSettings = Seq(
version := libVersion,
organization := "com.twitter",
crossScalaVersions := Seq("2.10.6", "2.11.7"),
scalaVersion := "2.11.7",
scalaVersion := "2.11.8",
libraryDependencies ++= Seq(
"org.scalacheck" %% "scalacheck" % "1.12.2" % "test",
"org.scalatest" %% "scalatest" % "2.2.4" % "test",
Expand All @@ -81,12 +63,7 @@ object Finagle extends Build {
),
resolvers += "twitter-repo" at "https://maven.twttr.com",

ScoverageSbtPlugin.ScoverageKeys.coverageHighlighting := (
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, 10)) => false
case _ => true
}
),
ScoverageSbtPlugin.ScoverageKeys.coverageHighlighting := true,

javaOptions in Test := Seq("-DSKIP_FLAKY=1"),

Expand All @@ -97,9 +74,18 @@ object Finagle extends Build {
<exclude org="javax.jms" module="jms" />
</dependencies>,

scalacOptions := scalacOptionsVersion(scalaVersion.value),
javacOptions ++= Seq("-Xlint:unchecked", "-source", "1.7", "-target", "1.7"),
javacOptions in doc := Seq("-source", "1.7"),
scalacOptions := Seq(
// Note: Add -deprecation when deprecated methods are removed
"-target:jvm-1.8",
"-unchecked",
"-feature",
"-language:_",
"-encoding", "utf8",
"-Xlint:-missing-interpolator",
"-Ypatmat-exhaust-depth", "40"
),
javacOptions ++= Seq("-Xlint:unchecked", "-source", "1.8", "-target", "1.8"),
javacOptions in doc := Seq("-source", "1.8"),

// This is bad news for things like com.twitter.util.Time
parallelExecution in Test := false,
Expand Down
7 changes: 6 additions & 1 deletion project/build.sbt
@@ -1 +1,6 @@
scalacOptions ++= Seq("-deprecation", "-unchecked", "-feature", "-Xlint", "-encoding", "utf8")
scalacOptions ++= Seq(
"-deprecation",
"-unchecked",
"-feature", "-Xlint",
"-encoding", "utf8"
)
1 change: 0 additions & 1 deletion sbt
Expand Up @@ -31,7 +31,6 @@ java -ea \
-XX:+CMSParallelRemarkEnabled \
-XX:+CMSClassUnloadingEnabled \
-XX:ReservedCodeCacheSize=128m \
-XX:MaxPermSize=1024m \
-XX:SurvivorRatio=128 \
-XX:MaxTenuringThreshold=0 \
-Xss8M \
Expand Down

0 comments on commit d832ef5

Please sign in to comment.