Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e03143e

Browse files
author
Piyush Narang
committedJan 9, 2017
Merge branch 'release/0.9.5' into 2.12_release
2 parents 9352a22 + 0cae140 commit e03143e

File tree

10 files changed

+103
-159
lines changed

10 files changed

+103
-159
lines changed
 

‎.travis.yml

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,36 @@ sudo: false
33
matrix:
44
include:
55
- scala: 2.10.6
6-
script: ./sbt "+++$TRAVIS_SCALA_VERSION clean" "+++$TRAVIS_SCALA_VERSION scalafmtTest" "+++$TRAVIS_SCALA_VERSION test" "+++$TRAVIS_SCALA_VERSION mimaReportBinaryIssues"
6+
script: ./sbt "+++$TRAVIS_SCALA_VERSION clean" "+++$TRAVIS_SCALA_VERSION test" "+++$TRAVIS_SCALA_VERSION mimaReportBinaryIssues"
77

88
- scala: 2.11.8
9-
script: ./sbt "+++$TRAVIS_SCALA_VERSION clean" "+++$TRAVIS_SCALA_VERSION scalafmtTest" "+++$TRAVIS_SCALA_VERSION test" "+++$TRAVIS_SCALA_VERSION coverageReport" "+++$TRAVIS_SCALA_VERSION mimaReportBinaryIssues"
10-
11-
- scala: 2.12.0
129
jdk: oraclejdk8
13-
script: ./sbt "+++$TRAVIS_SCALA_VERSION clean" "+++$TRAVIS_SCALA_VERSION test"
10+
script: ./sbt ++$TRAVIS_SCALA_VERSION clean coverage scalafmtTest test coverageReport mimaReportBinaryIssues
1411
after_success:
1512
- bash <(curl -s https://codecov.io/bash)
13+
14+
- scala: 2.12.1
15+
jdk: oraclejdk8
16+
script: ./sbt ++$TRAVIS_SCALA_VERSION clean test
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/823bad727793c3cd3caf
36+
on_success: change
37+
on_failure: always
38+
on_start: never

‎README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
## 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)
1+
## Bijection
2+
3+
[![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)
4+
[![Latest version](https://index.scala-lang.org/twitter/bijection/bijection-core/latest.svg?color=orange)](https://index.scala-lang.org/twitter/bijection/bijection-core)
5+
[![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)
26

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

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

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

145149
## Maven
146150

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

149153
Current published artifacts are
150154

@@ -160,9 +164,9 @@ Current published artifacts are
160164
* `bijection-avro`
161165
* `bijection-hbase`
162166

163-
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:
167+
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:
164168

165-
`bijection-core_2.10` or `bijection-core_2.11` or `bijection-core_2.12`.
169+
`bijection-core_2.10` or `bijection-core_2.11` or `bijection-core_2.12`.
166170

167171
## Chat
168172
[![Gitter](https://badges.gitter.im/twitter/bijection.svg)](https://gitter.im/twitter/bijection?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)

‎bijection-finagle-mysql/src/main/scala/com/twitter/bijection/finagle_mysql/MySqlConversions.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ limitations under the License.
1616

1717
package com.twitter.bijection.finagle_mysql
1818

19-
import com.twitter.finagle.exp.mysql._
2019
import com.twitter.bijection._
20+
import com.twitter.finagle.mysql._
2121
import java.sql.Timestamp
22-
import scala.util.{Try, Success, Failure}
22+
import scala.util.{Failure, Success, Try}
2323

2424
/**
2525
* Bijections and injections for mapping twitter-finagle's MySql datatypes to Scala datatypes

‎bijection-finagle-mysql/src/test/scala/com/twitter/bijection/finagle_mysql/MySqlConversionLaws.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ package com.twitter.bijection.finagle_mysql
1818

1919
import com.twitter.bijection.{CheckProperties, BaseProperties, Bijection}
2020
import org.scalacheck.Arbitrary
21-
import com.twitter.finagle.exp.mysql._
21+
import com.twitter.finagle.mysql._
2222
import java.sql.Timestamp
2323
import java.util.Date
2424

‎bijection-scrooge/src/test/scala/com/twitter/bijection/scrooge/TestStruct.scala

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,9 @@
33
*/
44
package com.twitter.bijection.scrooge
55

6-
import com.twitter.scrooge.{ThriftException, ThriftStruct, ThriftStructCodec3}
6+
import com.twitter.scrooge.{ThriftStruct, ThriftStructCodec3}
77
import org.apache.thrift.protocol._
8-
import java.nio.ByteBuffer
9-
import com.twitter.finagle.SourcedException
10-
import scala.collection.mutable
11-
import scala.collection.{Map, Set}
8+
import scala.util.hashing.MurmurHash3
129

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

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

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

140-
override def hashCode: Int = runtime.ScalaRunTime._hashCode(this)
142+
override def hashCode: Int = MurmurHash3.productHash(this)
141143

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

144146
override def productArity: Int = 2
145147

‎build.sbt

Lines changed: 44 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,44 @@ import com.typesafe.sbt.osgi.SbtOsgi.autoImport._
55
import ReleaseTransformations._ // for sbt-release.
66
import bijection._
77

8+
val finagleVersion210 = "6.35.0"
9+
val finagleVersion = "6.41.0"
10+
11+
val scalatestVersion = "3.0.1"
12+
val scalacheckVersion = "1.13.4"
13+
14+
val utilVersion210 = "6.34.0"
15+
val utilVersion = "6.39.0"
16+
17+
val scroogeSerializerVersion210 = "3.17.0"
18+
val scroogeSerializerVersion = "4.13.0"
19+
20+
def util(mod: String, scalaVersion: String) = {
21+
val version = versionFallback(scalaVersion, utilVersion210, utilVersion)
22+
"com.twitter" %% (s"util-$mod") % version
23+
}
24+
25+
def finagle(mod: String, scalaVersion: String) = {
26+
val version = versionFallback(scalaVersion, finagleVersion210, finagleVersion)
27+
"com.twitter" %% (s"finagle-$mod") % version
28+
}
29+
30+
def scroogeSerializer(scalaVersion: String) = {
31+
val version = versionFallback(scalaVersion, scroogeSerializerVersion210, scroogeSerializerVersion)
32+
"com.twitter" %% "scrooge-serializer" % version
33+
}
34+
35+
def versionFallback(scalaVersion: String, packageVersion210: String, version: String) = {
36+
if (scalaVersion startsWith "2.10") packageVersion210
37+
else version
38+
}
39+
840
val buildLevelSettings = Seq(
941
organization := "com.twitter",
10-
crossScalaVersions := Seq("2.10.6", "2.11.8", "2.12.0"),
42+
crossScalaVersions := Seq("2.10.6", "2.11.8", "2.12.1"),
1143
javacOptions ++= Seq("-source", "1.6", "-target", "1.6"),
1244
javacOptions in doc := Seq("-source", "1.6"),
1345
scalaVersion := "2.11.8",
14-
coverageEnabled := (if (scalaVersion.value startsWith "2.11") true else false),
1546
scalacOptions ++= Seq(
1647
"-unchecked",
1748
"-deprecation",
@@ -33,8 +64,8 @@ val buildLevelSettings = Seq(
3364
"releases" at "https://oss.sonatype.org/content/repositories/releases"
3465
),
3566
libraryDependencies ++= Seq(
36-
"org.scalacheck" %% "scalacheck" % "1.13.4" % "test",
37-
"org.scalatest" %% "scalatest" % "3.0.1" % "test"
67+
"org.scalacheck" %% "scalacheck" % scalacheckVersion % "test",
68+
"org.scalatest" %% "scalatest" % scalatestVersion % "test"
3869
),
3970
parallelExecution in Test := true,
4071
homepage := Some(url("https://github.com/twitter/bijection")),
@@ -140,8 +171,8 @@ lazy val bijection = {
140171
Project(
141172
id = "bijection",
142173
base = file("."),
143-
settings = buildLevelSettings ++ sharedSettings
144-
).enablePlugins(DocGen, SbtOsgi, CrossPerProjectPlugin)
174+
settings = buildLevelSettings ++ sharedSettings
175+
).enablePlugins(SbtOsgi, CrossPerProjectPlugin)
145176
.settings(
146177
test := {},
147178
publish := {}, // skip publishing for this root project.
@@ -244,13 +275,12 @@ lazy val bijectionGuava = {
244275

245276
lazy val bijectionScrooge = {
246277
module("scrooge").settings(
247-
crossScalaVersions := crossScalaVersions.value.filterNot(_.startsWith("2.12")),
248278
osgiExportAll("com.twitter.bijection.scrooge"),
249279
libraryDependencies ++= Seq(
250280
"org.apache.thrift" % "libthrift" % "0.6.1" exclude ("junit", "junit"),
251-
"com.twitter" %% "scrooge-serializer" % "3.17.0",
252-
"com.twitter" %% "util-core" % "6.24.0",
253-
"com.twitter" %% "finagle-core" % "6.25.0" % "test"
281+
scroogeSerializer(scalaVersion.value),
282+
util("core", scalaVersion.value),
283+
finagle("core", scalaVersion.value) % "test"
254284
)
255285
).dependsOn(
256286
bijectionCore % "test->test;compile->compile",
@@ -270,21 +300,20 @@ lazy val bijectionJson = {
270300

271301
lazy val bijectionUtil = {
272302
module("util").settings(
273-
crossScalaVersions := crossScalaVersions.value.filterNot(_.startsWith("2.12")),
274303
osgiExportAll("com.twitter.bijection.twitter_util"),
275-
libraryDependencies += "com.twitter" %% "util-core" % "6.24.0"
304+
libraryDependencies += util("core", scalaVersion.value)
276305
).dependsOn(
277306
bijectionCore % "test->test;compile->compile"
278307
)
279308
}
280309

281310
lazy val bijectionFinagleMySql = {
282311
module("finagle-mysql").settings(
283-
crossScalaVersions := crossScalaVersions.value.filterNot(_.startsWith("2.12")),
312+
crossScalaVersions := crossScalaVersions.value.filterNot(_.startsWith("2.10")),
284313
osgiExportAll("com.twitter.bijection.finagle_mysql"),
285314
libraryDependencies ++= Seq(
286-
"com.twitter" %% "finagle-mysql" % "6.25.0",
287-
"com.twitter" %% "util-core" % "6.24.0"
315+
finagle("mysql", scalaVersion.value),
316+
util("core", scalaVersion.value)
288317
)
289318
).dependsOn(
290319
bijectionCore % "test->test;compile->compile"

‎project/DocGen.scala

Lines changed: 0 additions & 50 deletions
This file was deleted.

‎project/Unidoc.scala

Lines changed: 0 additions & 64 deletions
This file was deleted.

‎project/plugins.sbt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ resolvers ++= Seq(
22
"jgit-repo" at "http://download.eclipse.org/jgit/maven"
33
)
44

5-
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.3")
6-
addSbtPlugin("com.eed3si9n" % "sbt-doge" % "0.1.5")
7-
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")
8-
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.1.11")
9-
addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.5.4")
10-
addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.8.0")
11-
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.0")
12-
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "1.1")
5+
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.3")
6+
addSbtPlugin("com.eed3si9n" % "sbt-doge" % "0.1.5")
7+
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")
8+
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.1.12")
9+
addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.5.4")
10+
addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.8.0")
11+
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.0")
12+
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "1.1")

‎version.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version in ThisBuild := "0.9.5-SNAPSHOT"
1+
version in ThisBuild := "0.9.5"

0 commit comments

Comments
 (0)
Please sign in to comment.