Skip to content

Commit

Permalink
Merge branch 'release/0.9.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
Piyush Narang committed Feb 23, 2017
2 parents 9c75812 + 2a7935c commit 2fd85b7
Show file tree
Hide file tree
Showing 31 changed files with 1,044 additions and 127 deletions.
43 changes: 35 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,38 @@
language: scala
sudo: false
scala:
- 2.10.5
- 2.11.7
jdk:
- openjdk6
- oraclejdk7
- oraclejdk8
script: ./sbt ++$TRAVIS_SCALA_VERSION clean test doc
matrix:
include:
- scala: 2.10.6
script: ./sbt ++$TRAVIS_SCALA_VERSION clean test mimaReportBinaryIssues

- scala: 2.11.8
jdk: oraclejdk8
script: ./sbt ++$TRAVIS_SCALA_VERSION clean coverage test coverageReport mimaReportBinaryIssues
after_success:
- bash <(curl -s https://codecov.io/bash)

- scala: 2.12.1
jdk: oraclejdk8
script: ./sbt "+++$TRAVIS_SCALA_VERSION clean" "+++$TRAVIS_SCALA_VERSION test" # "+++$TRAVIS_SCALA_VERSION mimaReportBinaryIssues"

cache:
directories:
- $HOME/.sbt/0.13/dependency
- $HOME/.sbt/boot/scala*
- $HOME/.sbt/launchers
- $HOME/.ivy2/cache
- $HOME/.nvm

before_cache:
- du -h -d 1 $HOME/.ivy2/cache
- du -h -d 2 $HOME/.sbt/
- find $HOME/.sbt -name "*.lock" -type f -delete
- find $HOME/.ivy2/cache -name "ivydata-*.properties" -type f -delete

notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/70c0a6999346c4692935
on_success: change
on_failure: always
on_start: never
19 changes: 19 additions & 0 deletions COMMITTERS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Committers

Please see our [Project Governance](https://github.com/twitter/analytics-infra-governance) page for more details.

## Active

| Name | Handle |
|------------------------|-----------------------------------------------------------|
| Alex Levenson | [@isnotinvain](https://github.com/isnotinvain) |
| Ben Pence | [@benpence](https://github.com/benpence) |
| Ian O'Connell | [@ianoc](https://github.com/ianoc) |
| Joe Nievelt | [@jnievelt](https://github.com/jnievelt) |
| Oscar Boykin | [@johnynek](https://github.com/johnynek) |
| Pankaj Gupta | [@pankajroark](https://github.com/pankajroark) |
| Piyush Narang | [@piyushnarang](https://github.com/piyushnarang) |
| Ruban Monu | [@rubanm](https://github.com/rubanm) |
| Sriram Krishnan | [@sriramkrishnan](https://github.com/sriramkrishnan) |

##Emeritus
29 changes: 23 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
## Chill [![Build Status](https://secure.travis-ci.org/twitter/chill.png)](http://travis-ci.org/twitter/chill)
## Chill

[![Build Status](https://secure.travis-ci.org/twitter/chill.png)](http://travis-ci.org/twitter/chill)
[![Codecov branch](https://img.shields.io/codecov/c/github/twitter/chill/develop.svg?maxAge=3600)](https://codecov.io/github/twitter/chill)
[![Latest version](https://index.scala-lang.org/twitter/chill/chill/latest.svg?color=orange)](https://index.scala-lang.org/twitter/chill/chill)
[![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)

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

## Community and Documentation

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.
## Documentation

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

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

## Contact

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).

## Get Involved + Code of Conduct

Pull requests and bug reports are always welcome!

We use a lightweight form of project governance inspired by the one used by Apache projects.
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.
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.

The current list of active committers (who can +1 a pull request) can be found here: [Committers](COMMITTERS.md)

A list of contributors to the project can be found here: [Contributors](https://github.com/twitter/chill/graphs/contributors)

## Maven

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.
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.

## Authors

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

Copyright 2012 Twitter, Inc.

Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
Licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0).
122 changes: 75 additions & 47 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,23 +1,16 @@
import ReleaseTransformations._
import com.typesafe.sbt.SbtScalariform._
import com.typesafe.tools.mima.plugin.MimaKeys._
import com.typesafe.tools.mima.plugin.MimaPlugin.mimaDefaultSettings
import scala.collection.JavaConverters._
import scalariform.formatter.preferences._
import sbtrelease.ReleaseStateTransformations._

val kryoVersion = "3.0.3"
val bijectionVersion = "0.9.0"
val algebirdVersion = "0.12.0"
val akkaVersion = "2.4.16"
val algebirdVersion = "0.13.0"
val bijectionVersion = "0.9.4"
val kryoVersion = "4.0.0"
val scroogeVersion = "4.12.0"

def isScala210x(scalaVersion: String) = scalaVersion match {
case version if version startsWith "2.10" => true
case _ => false
}

val sharedSettings = Project.defaultSettings ++ mimaDefaultSettings ++ scalariformSettings ++ Seq(
val sharedSettings = mimaDefaultSettings ++ scalariformSettings ++ Seq(
organization := "com.twitter",
scalaVersion := "2.10.5",
crossScalaVersions := Seq("2.10.5", "2.11.7"),
scalaVersion := "2.11.8",
crossScalaVersions := Seq("2.10.6", "2.11.8", "2.12.1"),
scalacOptions ++= Seq("-unchecked", "-deprecation"),
ScalariformKeys.preferences := formattingPreferences,

Expand All @@ -30,29 +23,39 @@ val sharedSettings = Project.defaultSettings ++ mimaDefaultSettings ++ scalarifo
Opts.resolver.sonatypeReleases
),
libraryDependencies ++= Seq(
"org.scalacheck" %% "scalacheck" % "1.11.5" % "test",
"org.scalatest" %% "scalatest" % "2.2.2" % "test",
"org.scalacheck" %% "scalacheck" % "1.11.6" % "test",
"org.scalatest" %% "scalatest" % "3.0.0" % "test",
"com.esotericsoftware" % "kryo-shaded" % kryoVersion
),

parallelExecution in Test := true,

// Publishing options:
releaseCrossBuild := true,
releaseCrossBuild := false, // needs to be false for sbt-doge
releasePublishArtifactsAction := PgpKeys.publishSigned.value,
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
releaseStepCommandAndRemaining("+test"),
setReleaseVersion,
commitReleaseVersion,
tagRelease,
releaseStepCommandAndRemaining("+publishSigned"),
setNextVersion,
commitNextVersion,
pushChanges
),
publishMavenStyle := true,
publishArtifact in Test := false,
pomIncludeRepository := { x => false },

publishTo <<= version { v =>
Some(
if (v.trim.toUpperCase.endsWith("SNAPSHOT"))
publishTo := Some(
if (version.value.trim.toUpperCase.endsWith("SNAPSHOT"))
Opts.resolver.sonatypeSnapshots
else
Opts.resolver.sonatypeStaging
//"twttr" at "http://artifactory.local.twitter.com/libs-releases-local"
)
},
),
pomExtra := (
<url>https://github.com/twitter/chill</url>
<licenses>
Expand Down Expand Up @@ -86,11 +89,9 @@ lazy val chillAll = Project(
id = "chill-all",
base = file("."),
settings = sharedSettings
).settings(
test := { },
publish := { },
publishLocal := { }
).aggregate(
).enablePlugins(CrossPerProjectPlugin)
.settings(noPublishSettings)
.aggregate(
chill,
chillBijection,
chillScrooge,
Expand All @@ -111,32 +112,49 @@ lazy val formattingPreferences = {
setPreference(PreserveSpaceBeforeArguments, true)
}

lazy val noPublishSettings = Seq(
publish := (),
publishLocal := (),
test := (),
publishArtifact := false
)

/**
* This returns the youngest jar we released that is compatible
* with the current.
*/
val unreleasedModules = Set[String]("akka")
val javaOnly = Set[String]("storm", "java", "hadoop", "thrift", "protobuf")
val binaryCompatVersion = "0.8.0"

def youngestForwardCompatible(subProj: String) =
Some(subProj)
.filterNot(unreleasedModules.contains(_))
.map { s =>
val suffix = if (javaOnly.contains(s)) "" else "_2.10"
"com.twitter" % ("chill-" + s + suffix) % "0.7.2"
if (javaOnly.contains(s))
"com.twitter" % ("chill-" + s) % binaryCompatVersion
else
"com.twitter" %% ("chill-" + s) % binaryCompatVersion
}

val ignoredABIProblems = {
import com.typesafe.tools.mima.core._
import com.typesafe.tools.mima.core.ProblemFilters._
Seq(
exclude[MissingTypesProblem]("com.twitter.chill.storm.BlizzardKryoFactory")
)
}

def module(name: String) = {
val id = "chill-%s".format(name)
Project(id = id, base = file(id), settings = sharedSettings ++ Seq(
Keys.name := id,
previousArtifact := youngestForwardCompatible(name),
mimaPreviousArtifacts := youngestForwardCompatible(name).toSet,
mimaBinaryIssueFilters ++= ignoredABIProblems,
// Disable cross publishing for java artifacts
publishArtifact <<= (scalaVersion) { scalaVersion =>
if(javaOnly.contains(name) && scalaVersion.startsWith("2.11")) false else true
}
)
)
publishArtifact :=
(if (javaOnly.contains(name) && scalaVersion.value.startsWith("2.11")) false else true)
))
}

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

def akka(scalaVersion: String) =
(scalaVersion match {
case s if s.startsWith("2.10.") => "com.typesafe.akka" %% "akka-actor" % "2.3.16"
case _ => "com.typesafe.akka" %% "akka-actor" % akkaVersion
}) % "provided"

def scrooge(scalaVersion: String) = {
val scroogeBase = "com.twitter" %% "scrooge-serializer"
scalaVersion match {
case s if s.startsWith("2.10.") => scroogeBase % "4.7.0" // the last 2.10 version
case _ => scroogeBase % scroogeVersion
}
}

lazy val chillAkka = module("akka").settings(
resolvers += "Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/",
resolvers += Resolver.typesafeRepo("releases"),
libraryDependencies ++= Seq(
"com.typesafe" % "config" % "1.2.1",
"com.typesafe.akka" %% "akka-actor" % "2.3.6" % "provided"
scalaVersion (sv => akka(sv)).value
)
).dependsOn(chill % "test->test;compile->compile")

Expand All @@ -174,11 +206,7 @@ lazy val chillJava = module("java").settings(
lazy val chillStorm = module("storm").settings(
crossPaths := false,
autoScalaLibrary := false,
resolvers ++= Seq(
"Clojars Repository" at "http://clojars.org/repo",
"Conjars Repository" at "http://conjars.org/repo"
),
libraryDependencies += "storm" % "storm" % "0.9.0-wip9" % "provided"
libraryDependencies += "org.apache.storm" % "storm-core" % "1.0.2" % "provided"
).dependsOn(chillJava)

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@ package com.twitter.chill.akka
* ****************************************************************************
*/

import akka.actor.ExtendedActorSystem
import akka.actor.ActorRef
import akka.actor.{ ActorRef, ActorPath, ExtendedActorSystem }
import akka.serialization.Serialization
import com.esotericsoftware.kryo.Kryo
import com.esotericsoftware.kryo.Serializer
import com.esotericsoftware.kryo.io.Input
import com.esotericsoftware.kryo.io.Output
import com.esotericsoftware.kryo.{ Kryo, Serializer }
import com.esotericsoftware.kryo.io.{ Input, Output }

import com.twitter.chill.{ toRich, IKryoRegistrar }

/**
* *
Expand All @@ -32,9 +31,6 @@ import com.esotericsoftware.kryo.io.Output
* @author Roman Levenstein
* @author P. Oscar Boykin
*/

import com.twitter.chill.{ toRich, IKryoRegistrar }

class ActorRefSerializer(system: ExtendedActorSystem) extends Serializer[ActorRef] with IKryoRegistrar {

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

override def read(kryo: Kryo, input: Input, typ: Class[ActorRef]): ActorRef = {
val path = input.readString()
system.actorFor(path)
val path = ActorPath.fromString(input.readString())
system.provider.resolveActorRef(path)
}

override def write(kryo: Kryo, output: Output, obj: ActorRef) = {
Expand Down
Loading

0 comments on commit 2fd85b7

Please sign in to comment.