Skip to content
This repository has been archived by the owner on Jun 19, 2019. It is now read-only.

Commit

Permalink
Enable Scala 2.11 SBT builds for util-eval, ostrich, and finagle-ostr…
Browse files Browse the repository at this point in the history
…ich4

Problem

We want to publish 2.11 releases of Finagle subprojects that depend on Ostrich,
which we have not previously built for 2.11 (because it has specs tests, and
because it depends on scala-json and util-eval, neither of which previously
worked on 2.11).

Solution

util-eval previously didn't work on 2.11 because `scala.ScalaObject` has been
removed since 2.10. This is fixed here. The bulk of this commit is Rodrigo
Lazoti's migration of Ostrich's tests from specs to ScalaTest (I'm not using his
pull request since the PR also replaces scala-json with Jackson, which we don't
want to do at this time to avoid breaking public APIs). This commit also
reinstates util-eval and the Finagle subprojects that depend on Ostrich in their
projects' cross-builds.

Result

util-eval, ostrich, finagle-ostrich4, finagle-example, and finagle-stress all
build and pass tests on 2.11 (from SBT) for the first time.

RB_ID=534127
  • Loading branch information
travisbrown authored and stevegury committed Dec 16, 2014
1 parent 6197982 commit a202800
Show file tree
Hide file tree
Showing 36 changed files with 2,297 additions and 2,123 deletions.
18 changes: 16 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
language: scala

scala:
- 2.9.2
script: "./sbt test"
- 2.10.4
- 2.11.4

jdk:
- oraclejdk7
# Note: not currently testing on JDK 8 internally
- oraclejdk8
- openjdk7

before_script:
# default $SBT_OPTS is irrelevant to sbt lancher
- unset SBT_OPTS

script:
- ./sbt ++$TRAVIS_SCALA_VERSION test
18 changes: 5 additions & 13 deletions project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ object Ostrich extends Build {
name := "ostrich",
version := libVersion,
organization := "com.twitter",
crossScalaVersions := Seq("2.10.4"),
crossScalaVersions := Seq("2.10.4", "2.11.4"),
javacOptions ++= Seq("-source", "1.6", "-target", "1.6"),
javacOptions in doc := Seq("-source", "1.6"),
parallelExecution in Test := false,
Expand All @@ -20,21 +20,13 @@ object Ostrich extends Build {
"com.twitter" %% "util-eval" % utilVersion,
"com.twitter" %% "util-logging" % utilVersion,
"com.twitter" %% "util-jvm" % utilVersion,
"com.twitter" %% "scala-json" % "3.0.1"
"com.twitter" %% "scala-json" % "3.0.2"
),

libraryDependencies ++= Seq(
"org.scala-tools.testing" %% "specs" % "1.6.9" % "test" cross CrossVersion.binaryMapped {
case "2.9.2" => "2.9.1"
case "2.10.0" => "2.10"
case x => x
},
"junit" % "junit" % "4.8.1" % "test",
"cglib" % "cglib" % "2.1_3" % "test",
"asm" % "asm" % "1.5.3" % "test",
"org.objenesis" % "objenesis" % "1.1" % "test",
"org.hamcrest" % "hamcrest-all" % "1.1" % "test",
"org.jmock" % "jmock" % "2.4.0" % "test"
"junit" % "junit" % "4.10" % "test",
"org.mockito" % "mockito-all" % "1.9.5" % "test",
"org.scalatest" %% "scalatest" % "2.2.2" % "test"
),
publishMavenStyle := true,
publishTo <<= version { (v: String) =>
Expand Down
4 changes: 1 addition & 3 deletions src/test/scala/BUILD
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
junit_tests(name='scala',
dependencies=[
'3rdparty:cglib',
'3rdparty:jmock',
'3rdparty:junit',
'3rdparty:mockito-all',
'3rdparty:specs',
'3rdparty:scalatest',
'ostrich',
'util/util-core',
'util/util-logging',
Expand Down
27 changes: 0 additions & 27 deletions src/test/scala/com/twitter/ostrich/ConfiguredSpecification.scala

This file was deleted.

Loading

0 comments on commit a202800

Please sign in to comment.