Skip to content

Commit 2fd85b7

Browse files
author
Piyush Narang
committed
Merge branch 'release/0.9.2'
2 parents 9c75812 + 2a7935c commit 2fd85b7

31 files changed

+1044
-127
lines changed

.travis.yml

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,38 @@
11
language: scala
22
sudo: false
3-
scala:
4-
- 2.10.5
5-
- 2.11.7
6-
jdk:
7-
- openjdk6
8-
- oraclejdk7
9-
- oraclejdk8
10-
script: ./sbt ++$TRAVIS_SCALA_VERSION clean test doc
3+
matrix:
4+
include:
5+
- scala: 2.10.6
6+
script: ./sbt ++$TRAVIS_SCALA_VERSION clean test mimaReportBinaryIssues
117

8+
- scala: 2.11.8
9+
jdk: oraclejdk8
10+
script: ./sbt ++$TRAVIS_SCALA_VERSION clean coverage test coverageReport mimaReportBinaryIssues
11+
after_success:
12+
- bash <(curl -s https://codecov.io/bash)
13+
14+
- scala: 2.12.1
15+
jdk: oraclejdk8
16+
script: ./sbt "+++$TRAVIS_SCALA_VERSION clean" "+++$TRAVIS_SCALA_VERSION test" # "+++$TRAVIS_SCALA_VERSION mimaReportBinaryIssues"
17+
18+
cache:
19+
directories:
20+
- $HOME/.sbt/0.13/dependency
21+
- $HOME/.sbt/boot/scala*
22+
- $HOME/.sbt/launchers
23+
- $HOME/.ivy2/cache
24+
- $HOME/.nvm
25+
26+
before_cache:
27+
- du -h -d 1 $HOME/.ivy2/cache
28+
- du -h -d 2 $HOME/.sbt/
29+
- find $HOME/.sbt -name "*.lock" -type f -delete
30+
- find $HOME/.ivy2/cache -name "ivydata-*.properties" -type f -delete
31+
32+
notifications:
33+
webhooks:
34+
urls:
35+
- https://webhooks.gitter.im/e/70c0a6999346c4692935
36+
on_success: change
37+
on_failure: always
38+
on_start: never

COMMITTERS.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Committers
2+
3+
Please see our [Project Governance](https://github.com/twitter/analytics-infra-governance) page for more details.
4+
5+
## Active
6+
7+
| Name | Handle |
8+
|------------------------|-----------------------------------------------------------|
9+
| Alex Levenson | [@isnotinvain](https://github.com/isnotinvain) |
10+
| Ben Pence | [@benpence](https://github.com/benpence) |
11+
| Ian O'Connell | [@ianoc](https://github.com/ianoc) |
12+
| Joe Nievelt | [@jnievelt](https://github.com/jnievelt) |
13+
| Oscar Boykin | [@johnynek](https://github.com/johnynek) |
14+
| Pankaj Gupta | [@pankajroark](https://github.com/pankajroark) |
15+
| Piyush Narang | [@piyushnarang](https://github.com/piyushnarang) |
16+
| Ruban Monu | [@rubanm](https://github.com/rubanm) |
17+
| Sriram Krishnan | [@sriramkrishnan](https://github.com/sriramkrishnan) |
18+
19+
##Emeritus

README.md

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
## Chill [![Build Status](https://secure.travis-ci.org/twitter/chill.png)](http://travis-ci.org/twitter/chill)
1+
## Chill
2+
3+
[![Build Status](https://secure.travis-ci.org/twitter/chill.png)](http://travis-ci.org/twitter/chill)
4+
[![Codecov branch](https://img.shields.io/codecov/c/github/twitter/chill/develop.svg?maxAge=3600)](https://codecov.io/github/twitter/chill)
5+
[![Latest version](https://index.scala-lang.org/twitter/chill/chill/latest.svg?color=orange)](https://index.scala-lang.org/twitter/chill/chill)
6+
[![Chat](https://badges.gitter.im/twitter/chill.svg)](https://gitter.im/twitter/chill?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
27

38
Extensions for the [Kryo serialization library](https://github.com/EsotericSoftware/kryo) including
49
serializers and a set of classes to ease configuration of Kryo in systems like Hadoop, Storm,
@@ -147,19 +152,31 @@ If you want to use the `chill.config.ConfiguredInstantiator` see `ConfiguredAkka
147152
otherwise, subclass `AkkaSerializer` and override `kryoInstantiator` to control how the `Kryo`
148153
object is created.
149154

150-
## Community and Documentation
151-
152-
This, and all [github.com/twitter](https://github.com/twitter) projects, are under the [Twitter Open Source Code of Conduct](https://engineering.twitter.com/opensource/code-of-conduct). Additionally, see the [Typelevel Code of Conduct](http://typelevel.org/conduct) for specific examples of harassing behavior that are not tolerated.
155+
## Documentation
153156

154157
To learn more and find links to tutorials and information around the web, check out the [Chill Wiki](https://github.com/twitter/chill/wiki).
155158

156159
The latest ScalaDocs are hosted on Chill's [Github Project Page](http://twitter.github.io/chill).
157160

161+
## Contact
162+
158163
Discussion occurs primarily on the [Chill mailing list](https://groups.google.com/forum/#!forum/chill-user). Issues should be reported on the [GitHub issue tracker](https://github.com/twitter/chill/issues).
159164

165+
## Get Involved + Code of Conduct
166+
167+
Pull requests and bug reports are always welcome!
168+
169+
We use a lightweight form of project governance inspired by the one used by Apache projects.
170+
Please see [Contributing and Committership](https://github.com/twitter/analytics-infra-governance#contributing-and-committership) for our code of conduct and our pull request review process.
171+
The TL;DR is send us a pull request, iterate on the feedback + discussion, and get a +1 from a [Committer](COMMITTERS.md) in order to get your PR accepted.
172+
173+
The current list of active committers (who can +1 a pull request) can be found here: [Committers](COMMITTERS.md)
174+
175+
A list of contributors to the project can be found here: [Contributors](https://github.com/twitter/chill/graphs/contributors)
176+
160177
## Maven
161178

162-
Chill modules are available on Maven Central. The current groupid and version for all modules is, respectively, `"com.twitter"` and `0.8.0` and each scala project is published for `2.10` and `2.11`. Search [search.maven.org](http://search.maven.org/#search%7Cga%7C1%7Cchill) when in doubt.
179+
Chill modules are available on Maven Central. The current groupid and version for all modules is, respectively, `"com.twitter"` and `0.8.0` and each scala project is published for `2.10`, `2.11` and `2.12`. Search [search.maven.org](http://search.maven.org/#search%7Cga%7C1%7Cchill) when in doubt.
163180

164181
## Authors
165182

@@ -171,4 +188,4 @@ Chill modules are available on Maven Central. The current groupid and version fo
171188

172189
Copyright 2012 Twitter, Inc.
173190

174-
Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
191+
Licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0).

build.sbt

Lines changed: 75 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,16 @@
1-
import ReleaseTransformations._
2-
import com.typesafe.sbt.SbtScalariform._
3-
import com.typesafe.tools.mima.plugin.MimaKeys._
41
import com.typesafe.tools.mima.plugin.MimaPlugin.mimaDefaultSettings
5-
import scala.collection.JavaConverters._
6-
import scalariform.formatter.preferences._
2+
import sbtrelease.ReleaseStateTransformations._
73

8-
val kryoVersion = "3.0.3"
9-
val bijectionVersion = "0.9.0"
10-
val algebirdVersion = "0.12.0"
4+
val akkaVersion = "2.4.16"
5+
val algebirdVersion = "0.13.0"
6+
val bijectionVersion = "0.9.4"
7+
val kryoVersion = "4.0.0"
8+
val scroogeVersion = "4.12.0"
119

12-
def isScala210x(scalaVersion: String) = scalaVersion match {
13-
case version if version startsWith "2.10" => true
14-
case _ => false
15-
}
16-
17-
val sharedSettings = Project.defaultSettings ++ mimaDefaultSettings ++ scalariformSettings ++ Seq(
10+
val sharedSettings = mimaDefaultSettings ++ scalariformSettings ++ Seq(
1811
organization := "com.twitter",
19-
scalaVersion := "2.10.5",
20-
crossScalaVersions := Seq("2.10.5", "2.11.7"),
12+
scalaVersion := "2.11.8",
13+
crossScalaVersions := Seq("2.10.6", "2.11.8", "2.12.1"),
2114
scalacOptions ++= Seq("-unchecked", "-deprecation"),
2215
ScalariformKeys.preferences := formattingPreferences,
2316

@@ -30,29 +23,39 @@ val sharedSettings = Project.defaultSettings ++ mimaDefaultSettings ++ scalarifo
3023
Opts.resolver.sonatypeReleases
3124
),
3225
libraryDependencies ++= Seq(
33-
"org.scalacheck" %% "scalacheck" % "1.11.5" % "test",
34-
"org.scalatest" %% "scalatest" % "2.2.2" % "test",
26+
"org.scalacheck" %% "scalacheck" % "1.11.6" % "test",
27+
"org.scalatest" %% "scalatest" % "3.0.0" % "test",
3528
"com.esotericsoftware" % "kryo-shaded" % kryoVersion
3629
),
3730

3831
parallelExecution in Test := true,
3932

4033
// Publishing options:
41-
releaseCrossBuild := true,
34+
releaseCrossBuild := false, // needs to be false for sbt-doge
4235
releasePublishArtifactsAction := PgpKeys.publishSigned.value,
36+
releaseProcess := Seq[ReleaseStep](
37+
checkSnapshotDependencies,
38+
inquireVersions,
39+
runClean,
40+
releaseStepCommandAndRemaining("+test"),
41+
setReleaseVersion,
42+
commitReleaseVersion,
43+
tagRelease,
44+
releaseStepCommandAndRemaining("+publishSigned"),
45+
setNextVersion,
46+
commitNextVersion,
47+
pushChanges
48+
),
4349
publishMavenStyle := true,
4450
publishArtifact in Test := false,
4551
pomIncludeRepository := { x => false },
4652

47-
publishTo <<= version { v =>
48-
Some(
49-
if (v.trim.toUpperCase.endsWith("SNAPSHOT"))
53+
publishTo := Some(
54+
if (version.value.trim.toUpperCase.endsWith("SNAPSHOT"))
5055
Opts.resolver.sonatypeSnapshots
5156
else
5257
Opts.resolver.sonatypeStaging
53-
//"twttr" at "http://artifactory.local.twitter.com/libs-releases-local"
54-
)
55-
},
58+
),
5659
pomExtra := (
5760
<url>https://github.com/twitter/chill</url>
5861
<licenses>
@@ -86,11 +89,9 @@ lazy val chillAll = Project(
8689
id = "chill-all",
8790
base = file("."),
8891
settings = sharedSettings
89-
).settings(
90-
test := { },
91-
publish := { },
92-
publishLocal := { }
93-
).aggregate(
92+
).enablePlugins(CrossPerProjectPlugin)
93+
.settings(noPublishSettings)
94+
.aggregate(
9495
chill,
9596
chillBijection,
9697
chillScrooge,
@@ -111,32 +112,49 @@ lazy val formattingPreferences = {
111112
setPreference(PreserveSpaceBeforeArguments, true)
112113
}
113114

115+
lazy val noPublishSettings = Seq(
116+
publish := (),
117+
publishLocal := (),
118+
test := (),
119+
publishArtifact := false
120+
)
121+
114122
/**
115123
* This returns the youngest jar we released that is compatible
116124
* with the current.
117125
*/
118126
val unreleasedModules = Set[String]("akka")
119127
val javaOnly = Set[String]("storm", "java", "hadoop", "thrift", "protobuf")
128+
val binaryCompatVersion = "0.8.0"
120129

121130
def youngestForwardCompatible(subProj: String) =
122131
Some(subProj)
123132
.filterNot(unreleasedModules.contains(_))
124133
.map { s =>
125-
val suffix = if (javaOnly.contains(s)) "" else "_2.10"
126-
"com.twitter" % ("chill-" + s + suffix) % "0.7.2"
134+
if (javaOnly.contains(s))
135+
"com.twitter" % ("chill-" + s) % binaryCompatVersion
136+
else
137+
"com.twitter" %% ("chill-" + s) % binaryCompatVersion
127138
}
128139

140+
val ignoredABIProblems = {
141+
import com.typesafe.tools.mima.core._
142+
import com.typesafe.tools.mima.core.ProblemFilters._
143+
Seq(
144+
exclude[MissingTypesProblem]("com.twitter.chill.storm.BlizzardKryoFactory")
145+
)
146+
}
147+
129148
def module(name: String) = {
130149
val id = "chill-%s".format(name)
131150
Project(id = id, base = file(id), settings = sharedSettings ++ Seq(
132151
Keys.name := id,
133-
previousArtifact := youngestForwardCompatible(name),
152+
mimaPreviousArtifacts := youngestForwardCompatible(name).toSet,
153+
mimaBinaryIssueFilters ++= ignoredABIProblems,
134154
// Disable cross publishing for java artifacts
135-
publishArtifact <<= (scalaVersion) { scalaVersion =>
136-
if(javaOnly.contains(name) && scalaVersion.startsWith("2.11")) false else true
137-
}
138-
)
139-
)
155+
publishArtifact :=
156+
(if (javaOnly.contains(name) && scalaVersion.value.startsWith("2.11")) false else true)
157+
))
140158
}
141159

142160
// We usually do the pattern of having a core module, but we don't want to cause
@@ -147,14 +165,28 @@ lazy val chill = Project(
147165
settings = sharedSettings
148166
).settings(
149167
name := "chill",
150-
previousArtifact := Some("com.twitter" % "chill_2.10" % "0.7.2")
168+
mimaPreviousArtifacts := Set("com.twitter" %% "chill" % binaryCompatVersion)
151169
).dependsOn(chillJava)
152170

171+
def akka(scalaVersion: String) =
172+
(scalaVersion match {
173+
case s if s.startsWith("2.10.") => "com.typesafe.akka" %% "akka-actor" % "2.3.16"
174+
case _ => "com.typesafe.akka" %% "akka-actor" % akkaVersion
175+
}) % "provided"
176+
177+
def scrooge(scalaVersion: String) = {
178+
val scroogeBase = "com.twitter" %% "scrooge-serializer"
179+
scalaVersion match {
180+
case s if s.startsWith("2.10.") => scroogeBase % "4.7.0" // the last 2.10 version
181+
case _ => scroogeBase % scroogeVersion
182+
}
183+
}
184+
153185
lazy val chillAkka = module("akka").settings(
154-
resolvers += "Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/",
186+
resolvers += Resolver.typesafeRepo("releases"),
155187
libraryDependencies ++= Seq(
156188
"com.typesafe" % "config" % "1.2.1",
157-
"com.typesafe.akka" %% "akka-actor" % "2.3.6" % "provided"
189+
scalaVersion (sv => akka(sv)).value
158190
)
159191
).dependsOn(chill % "test->test;compile->compile")
160192

@@ -174,11 +206,7 @@ lazy val chillJava = module("java").settings(
174206
lazy val chillStorm = module("storm").settings(
175207
crossPaths := false,
176208
autoScalaLibrary := false,
177-
resolvers ++= Seq(
178-
"Clojars Repository" at "http://clojars.org/repo",
179-
"Conjars Repository" at "http://conjars.org/repo"
180-
),
181-
libraryDependencies += "storm" % "storm" % "0.9.0-wip9" % "provided"
209+
libraryDependencies += "org.apache.storm" % "storm-core" % "1.0.2" % "provided"
182210
).dependsOn(chillJava)
183211

184212
// This can only have java deps!
@@ -204,7 +232,7 @@ lazy val chillThrift = module("thrift").settings(
204232
lazy val chillScrooge = module("scrooge").settings(
205233
libraryDependencies ++= Seq(
206234
"org.apache.thrift" % "libthrift" % "0.6.1" exclude("junit", "junit"),
207-
"com.twitter" %% "scrooge-serializer" % "3.20.0"
235+
scalaVersion (sv => scrooge(sv)).value
208236
)
209237
).dependsOn(chill % "test->test;compile->compile")
210238

chill-akka/src/main/scala/com/twitter/chill/akka/ActorRefSerializer.scala

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,12 @@ package com.twitter.chill.akka
1717
* ****************************************************************************
1818
*/
1919

20-
import akka.actor.ExtendedActorSystem
21-
import akka.actor.ActorRef
20+
import akka.actor.{ ActorRef, ActorPath, ExtendedActorSystem }
2221
import akka.serialization.Serialization
23-
import com.esotericsoftware.kryo.Kryo
24-
import com.esotericsoftware.kryo.Serializer
25-
import com.esotericsoftware.kryo.io.Input
26-
import com.esotericsoftware.kryo.io.Output
22+
import com.esotericsoftware.kryo.{ Kryo, Serializer }
23+
import com.esotericsoftware.kryo.io.{ Input, Output }
24+
25+
import com.twitter.chill.{ toRich, IKryoRegistrar }
2726

2827
/**
2928
* *
@@ -32,9 +31,6 @@ import com.esotericsoftware.kryo.io.Output
3231
* @author Roman Levenstein
3332
* @author P. Oscar Boykin
3433
*/
35-
36-
import com.twitter.chill.{ toRich, IKryoRegistrar }
37-
3834
class ActorRefSerializer(system: ExtendedActorSystem) extends Serializer[ActorRef] with IKryoRegistrar {
3935

4036
def apply(kryo: Kryo): Unit = {
@@ -45,8 +41,8 @@ class ActorRefSerializer(system: ExtendedActorSystem) extends Serializer[ActorRe
4541
}
4642

4743
override def read(kryo: Kryo, input: Input, typ: Class[ActorRef]): ActorRef = {
48-
val path = input.readString()
49-
system.actorFor(path)
44+
val path = ActorPath.fromString(input.readString())
45+
system.provider.resolveActorRef(path)
5046
}
5147

5248
override def write(kryo: Kryo, output: Output, obj: ActorRef) = {

0 commit comments

Comments
 (0)