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

Upgrade finagle to 17.11.0 and sbt to 1.0.3 #13

Merged
merged 6 commits into from Nov 18, 2017
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 11 additions & 1 deletion build.sbt
Expand Up @@ -3,6 +3,7 @@ import ReleaseTransformations._
parallelExecution in ThisBuild := false

lazy val versions = new {
val finatra = "17.11.0"
val finatra = "17.10.0"
val logback = "1.1.7"
val scalatest = "3.0.3"
Expand All @@ -15,7 +16,16 @@ lazy val baseSettings = Seq(
organization := "com.github.3tty0n",
scalaVersion := "2.12.4",
scalafmtOnCompile := true,
ivyScala := ivyScala.value.map(_.copy(overrideScalaVersion = true)),
scalaModuleInfo := Some(
sbt.librarymanagement.ScalaModuleInfo(
(scalaVersion in update).value,
(scalaBinaryVersion in update).value,
Vector.empty,
checkExplicit = false,
filterImplicit = false,
overrideScalaVersion = true
)
),
scalacOptions := Seq(
"-encoding",
"UTF-8",
Expand Down
Expand Up @@ -3,12 +3,13 @@ package server
import com.twitter.finatra.thrift.ThriftServer
import com.twitter.finatra.thrift.routing.ThriftRouter
import com.twitter.finatra.thrift.filters._
import org.micchon.ping.thriftscala.PingService
import org.micchon.ping.thriftscala.PingService.{ Echo, Ping }
import com.twitter.finatra.thrift.Controller
import com.twitter.util.Future
import javax.inject.Singleton

import org.micchon.ping.thriftscala.PingService

object ExampleServerMain extends ExampleServer

class ExampleServer extends ThriftServer {
Expand All @@ -28,7 +29,7 @@ class ExampleServer extends ThriftServer {
}

@Singleton
class PingController extends Controller with PingService.BaseServiceIface {
class PingController extends Controller with PingService.ServicePerEndpoint {

override val ping = handle(Ping) { args: Ping.Args =>
info(s"Responding to ping thrift call")
Expand Down
Expand Up @@ -11,8 +11,8 @@ import org.micchon.ping.thriftscala.PingService
import scala.concurrent.duration._

class FeederSimulation extends ThriftSimulation {
val client: PingService.FutureIface =
Thrift.client.newIface[PingService.FutureIface]("localhost:9911")
val client: PingService.MethodPerEndpoint =
Thrift.client.newIface[PingService.MethodPerEndpoint]("localhost:9911")

implicit val thriftProtocol: ThriftProtocol =
thrift.port(9911).host("localhost").requestName("feeder request")
Expand Down
Expand Up @@ -14,8 +14,8 @@ import scala.concurrent.duration._

class SessionSimulation extends ThriftSimulation {

val client: PingService.FutureIface =
Thrift.client.newIface[PingService.FutureIface]("localhost:9911")
val client: PingService.MethodPerEndpoint =
Thrift.client.newIface[PingService.MethodPerEndpoint]("localhost:9911")

implicit val thriftProtocol: ThriftProtocol =
thrift.port(9911).host("localhost").requestName("feeder request")
Expand Down
Expand Up @@ -14,8 +14,8 @@ import scala.util.Random
import scala.concurrent.duration._

class SimpleSimulation extends ThriftSimulation {
val client: PingService.FutureIface =
Thrift.client.newIface[PingService.FutureIface]("localhost:9911")
val client: PingService.MethodPerEndpoint =
Thrift.client.newIface[PingService.MethodPerEndpoint]("localhost:9911")

implicit val thriftProtocol: ThriftProtocol =
thrift.port(9911).host("localhost").requestName("example request")
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
@@ -1 +1 @@
sbt.version=0.13.16
sbt.version=1.0.3
8 changes: 4 additions & 4 deletions project/plugins.sbt
Expand Up @@ -3,16 +3,16 @@ resolvers ++= Seq(
"Twitter Maven" at "https://maven.twttr.com"
)

addSbtPlugin("com.twitter" % "scrooge-sbt-plugin" % "17.10.0")
addSbtPlugin("com.twitter" % "scrooge-sbt-plugin" % "17.11.0")
addSbtPlugin("com.lucidchart" % "sbt-scalafmt" % "1.14")
addSbtPlugin("io.gatling" % "gatling-sbt" % "2.2.2")
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.5")
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.2.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.3.1")
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.6")

// for publish
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "1.1")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "2.0")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.0")

// for documentation
addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.3.1")
Expand Down
2 changes: 1 addition & 1 deletion src/main/paradox/features/usage.md
Expand Up @@ -13,7 +13,7 @@ class YourSimulation extends ThriftSimulation {
Define `client` and `thriftProtocol`:

``` scala
val client = Thrift.client.newIface[PingService.FutureIface]("localhost:9911")
val client = Thrift.client.newIface[PingService.MethodPerEndpoint]("localhost:9911")

implicit val thriftProtocol: ThriftProtocol = thrift
.port(9911)
Expand Down
4 changes: 2 additions & 2 deletions src/main/paradox/index.md
Expand Up @@ -15,7 +15,7 @@ First, you add `gatling-thrift` and `gatling` to `librarydependencies` in `build

```scala
librarydependencies ++= Seq(
"com.github.3tty0n" %% "gatling-thrift" % "0.5.0",
"com.github.3tty0n" %% "gatling-thrift" % "0.6.0",
"io.gatling" % "gatling-test-framework" % "2.3.0" % "test,it",
"io.gatling.highcharts" % "gatling-charts-highcharts" % "2.3.0" % "test,it"
)
Expand All @@ -24,7 +24,7 @@ librarydependencies ++= Seq(
And add these plugins to `project/plugins.sbt`:

```scala
addSbtPlugin("com.twitter" % "scrooge-sbt-plugin" % "17.10.0")
addSbtPlugin("com.twitter" % "scrooge-sbt-plugin" % "17.11.0")
addSbtPlugin("io.gatling" % "gatling-sbt" % "2.2.2")
```

Expand Down
2 changes: 1 addition & 1 deletion version.sbt
@@ -1 +1 @@
version in ThisBuild := "0.5.0-SNAPSHOT"
version in ThisBuild := "0.6.0-SNAPSHOT"