Skip to content

Commit

Permalink
Merge branch 'release/0.9.5' into 2.12_release
Browse files Browse the repository at this point in the history
  • Loading branch information
Piyush Narang committed Jan 9, 2017
2 parents 9352a22 + 0cae140 commit e03143e
Show file tree
Hide file tree
Showing 10 changed files with 103 additions and 159 deletions.
33 changes: 28 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,36 @@ sudo: false
matrix:
include:
- scala: 2.10.6
script: ./sbt "+++$TRAVIS_SCALA_VERSION clean" "+++$TRAVIS_SCALA_VERSION scalafmtTest" "+++$TRAVIS_SCALA_VERSION test" "+++$TRAVIS_SCALA_VERSION mimaReportBinaryIssues"
script: ./sbt "+++$TRAVIS_SCALA_VERSION clean" "+++$TRAVIS_SCALA_VERSION test" "+++$TRAVIS_SCALA_VERSION mimaReportBinaryIssues"

- scala: 2.11.8
script: ./sbt "+++$TRAVIS_SCALA_VERSION clean" "+++$TRAVIS_SCALA_VERSION scalafmtTest" "+++$TRAVIS_SCALA_VERSION test" "+++$TRAVIS_SCALA_VERSION coverageReport" "+++$TRAVIS_SCALA_VERSION mimaReportBinaryIssues"

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

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

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/823bad727793c3cd3caf
on_success: change
on_failure: always
on_start: never
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
## Bijection [![Build Status](https://secure.travis-ci.org/twitter/bijection.png)](http://travis-ci.org/twitter/bijection) [![Codecov](https://img.shields.io/codecov/c/github/twitter/bijection.svg?maxAge=2592000)](https://codecov.io/github/twitter/bijection)
## Bijection

[![Build Status](https://secure.travis-ci.org/twitter/bijection.png)](http://travis-ci.org/twitter/bijection) [![Codecov](https://img.shields.io/codecov/c/github/twitter/bijection.svg?maxAge=2592000)](https://codecov.io/github/twitter/bijection)
[![Latest version](https://index.scala-lang.org/twitter/bijection/bijection-core/latest.svg?color=orange)](https://index.scala-lang.org/twitter/bijection/bijection-core)
[![Chat](https://badges.gitter.im/twitter/bijection.svg)](https://gitter.im/twitter/bijection?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

A Bijection is an invertible function that converts back and forth between two types, with
the contract that a round-trip through the Bijection will bring back the original object. Moreover,
Expand Down Expand Up @@ -131,7 +135,7 @@ The latest ScalaDocs are hosted on Bijection's [Github Project Page](http://twit
## Get Involved + Code of Conduct
Pull requests and bug reports are always welcome!

Discussion occurs primarily on the [Bijection mailing list](https://groups.google.com/forum/#!forum/bijection).
Discussion occurs primarily on the [Bijection mailing list](https://groups.google.com/forum/#!forum/bijection).
Issues should be reported on the [GitHub issue tracker](https://github.com/twitter/bijection/issues).

We use a lightweight form of project governence inspired by the one used by Apache projects.
Expand All @@ -144,7 +148,7 @@ A list of contributors to the project can be found here: [Contributors](https://

## Maven

Bijection modules are available on maven central. The current groupid and version for all modules is, respectively, `"com.twitter"` and `0.9.4`.
Bijection modules are available on maven central. The current groupid and version for all modules is, respectively, `"com.twitter"` and `0.9.5`.

Current published artifacts are

Expand All @@ -160,9 +164,9 @@ Current published artifacts are
* `bijection-avro`
* `bijection-hbase`

Every artifact is published against Scala `"2.10"` and `"2.11"`. We currently publish a subset of bijection's modules against Scala `"2.12"`. Bijection modules - bijection-util and bijection-scrooge depend on other projects to publish 2.12 artifacts and currently aren't being published. To pull in the jars, make sure to add your desired scala version as a suffix, ie:
Every artifact is published against Scala `"2.10"`, `"2.11"` and `"2.12"`. To pull in the jars, make sure to add your desired scala version as a suffix, ie:

`bijection-core_2.10` or `bijection-core_2.11` or `bijection-core_2.12`.
`bijection-core_2.10` or `bijection-core_2.11` or `bijection-core_2.12`.

## Chat
[![Gitter](https://badges.gitter.im/twitter/bijection.svg)](https://gitter.im/twitter/bijection?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ limitations under the License.

package com.twitter.bijection.finagle_mysql

import com.twitter.finagle.exp.mysql._
import com.twitter.bijection._
import com.twitter.finagle.mysql._
import java.sql.Timestamp
import scala.util.{Try, Success, Failure}
import scala.util.{Failure, Success, Try}

/**
* Bijections and injections for mapping twitter-finagle's MySql datatypes to Scala datatypes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package com.twitter.bijection.finagle_mysql

import com.twitter.bijection.{CheckProperties, BaseProperties, Bijection}
import org.scalacheck.Arbitrary
import com.twitter.finagle.exp.mysql._
import com.twitter.finagle.mysql._
import java.sql.Timestamp
import java.util.Date

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@
*/
package com.twitter.bijection.scrooge

import com.twitter.scrooge.{ThriftException, ThriftStruct, ThriftStructCodec3}
import com.twitter.scrooge.{ThriftStruct, ThriftStructCodec3}
import org.apache.thrift.protocol._
import java.nio.ByteBuffer
import com.twitter.finagle.SourcedException
import scala.collection.mutable
import scala.collection.{Map, Set}
import scala.util.hashing.MurmurHash3

object TestStruct extends ThriftStructCodec3[TestStruct] {
val Struct = new TStruct("TestStruct")
Expand Down Expand Up @@ -135,11 +132,16 @@ trait TestStruct

override def canEqual(other: Any): Boolean = other.isInstanceOf[TestStruct]

override def equals(other: Any): Boolean = runtime.ScalaRunTime._equals(this, other)
// from runtime.ScalaRunTime._equals as that has been yanked out in 2.12.0
override def equals(other: Any): Boolean = other match {
case y: Product if (productArity == y.productArity) =>
productIterator sameElements y.productIterator
case _ => false
}

override def hashCode: Int = runtime.ScalaRunTime._hashCode(this)
override def hashCode: Int = MurmurHash3.productHash(this)

override def toString: String = runtime.ScalaRunTime._toString(this)
override def toString: String = productIterator.mkString(productPrefix + "(", ",", ")")

override def productArity: Int = 2

Expand Down
59 changes: 44 additions & 15 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,44 @@ import com.typesafe.sbt.osgi.SbtOsgi.autoImport._
import ReleaseTransformations._ // for sbt-release.
import bijection._

val finagleVersion210 = "6.35.0"
val finagleVersion = "6.41.0"

val scalatestVersion = "3.0.1"
val scalacheckVersion = "1.13.4"

val utilVersion210 = "6.34.0"
val utilVersion = "6.39.0"

val scroogeSerializerVersion210 = "3.17.0"
val scroogeSerializerVersion = "4.13.0"

def util(mod: String, scalaVersion: String) = {
val version = versionFallback(scalaVersion, utilVersion210, utilVersion)
"com.twitter" %% (s"util-$mod") % version
}

def finagle(mod: String, scalaVersion: String) = {
val version = versionFallback(scalaVersion, finagleVersion210, finagleVersion)
"com.twitter" %% (s"finagle-$mod") % version
}

def scroogeSerializer(scalaVersion: String) = {
val version = versionFallback(scalaVersion, scroogeSerializerVersion210, scroogeSerializerVersion)
"com.twitter" %% "scrooge-serializer" % version
}

def versionFallback(scalaVersion: String, packageVersion210: String, version: String) = {
if (scalaVersion startsWith "2.10") packageVersion210
else version
}

val buildLevelSettings = Seq(
organization := "com.twitter",
crossScalaVersions := Seq("2.10.6", "2.11.8", "2.12.0"),
crossScalaVersions := Seq("2.10.6", "2.11.8", "2.12.1"),
javacOptions ++= Seq("-source", "1.6", "-target", "1.6"),
javacOptions in doc := Seq("-source", "1.6"),
scalaVersion := "2.11.8",
coverageEnabled := (if (scalaVersion.value startsWith "2.11") true else false),
scalacOptions ++= Seq(
"-unchecked",
"-deprecation",
Expand All @@ -33,8 +64,8 @@ val buildLevelSettings = Seq(
"releases" at "https://oss.sonatype.org/content/repositories/releases"
),
libraryDependencies ++= Seq(
"org.scalacheck" %% "scalacheck" % "1.13.4" % "test",
"org.scalatest" %% "scalatest" % "3.0.1" % "test"
"org.scalacheck" %% "scalacheck" % scalacheckVersion % "test",
"org.scalatest" %% "scalatest" % scalatestVersion % "test"
),
parallelExecution in Test := true,
homepage := Some(url("https://github.com/twitter/bijection")),
Expand Down Expand Up @@ -140,8 +171,8 @@ lazy val bijection = {
Project(
id = "bijection",
base = file("."),
settings = buildLevelSettings ++ sharedSettings
).enablePlugins(DocGen, SbtOsgi, CrossPerProjectPlugin)
settings = buildLevelSettings ++ sharedSettings
).enablePlugins(SbtOsgi, CrossPerProjectPlugin)
.settings(
test := {},
publish := {}, // skip publishing for this root project.
Expand Down Expand Up @@ -244,13 +275,12 @@ lazy val bijectionGuava = {

lazy val bijectionScrooge = {
module("scrooge").settings(
crossScalaVersions := crossScalaVersions.value.filterNot(_.startsWith("2.12")),
osgiExportAll("com.twitter.bijection.scrooge"),
libraryDependencies ++= Seq(
"org.apache.thrift" % "libthrift" % "0.6.1" exclude ("junit", "junit"),
"com.twitter" %% "scrooge-serializer" % "3.17.0",
"com.twitter" %% "util-core" % "6.24.0",
"com.twitter" %% "finagle-core" % "6.25.0" % "test"
scroogeSerializer(scalaVersion.value),
util("core", scalaVersion.value),
finagle("core", scalaVersion.value) % "test"
)
).dependsOn(
bijectionCore % "test->test;compile->compile",
Expand All @@ -270,21 +300,20 @@ lazy val bijectionJson = {

lazy val bijectionUtil = {
module("util").settings(
crossScalaVersions := crossScalaVersions.value.filterNot(_.startsWith("2.12")),
osgiExportAll("com.twitter.bijection.twitter_util"),
libraryDependencies += "com.twitter" %% "util-core" % "6.24.0"
libraryDependencies += util("core", scalaVersion.value)
).dependsOn(
bijectionCore % "test->test;compile->compile"
)
}

lazy val bijectionFinagleMySql = {
module("finagle-mysql").settings(
crossScalaVersions := crossScalaVersions.value.filterNot(_.startsWith("2.12")),
crossScalaVersions := crossScalaVersions.value.filterNot(_.startsWith("2.10")),
osgiExportAll("com.twitter.bijection.finagle_mysql"),
libraryDependencies ++= Seq(
"com.twitter" %% "finagle-mysql" % "6.25.0",
"com.twitter" %% "util-core" % "6.24.0"
finagle("mysql", scalaVersion.value),
util("core", scalaVersion.value)
)
).dependsOn(
bijectionCore % "test->test;compile->compile"
Expand Down
50 changes: 0 additions & 50 deletions project/DocGen.scala

This file was deleted.

64 changes: 0 additions & 64 deletions project/Unidoc.scala

This file was deleted.

16 changes: 8 additions & 8 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ resolvers ++= Seq(
"jgit-repo" at "http://download.eclipse.org/jgit/maven"
)

addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.3")
addSbtPlugin("com.eed3si9n" % "sbt-doge" % "0.1.5")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.1.11")
addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.5.4")
addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.8.0")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.0")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "1.1")
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.3")
addSbtPlugin("com.eed3si9n" % "sbt-doge" % "0.1.5")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.1.12")
addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.5.4")
addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.8.0")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.0")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "1.1")
2 changes: 1 addition & 1 deletion version.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version in ThisBuild := "0.9.5-SNAPSHOT"
version in ThisBuild := "0.9.5"

0 comments on commit e03143e

Please sign in to comment.