twitter/bijection — pull request #121 by mosesn (2013-06-26 03:39:14+00:00)
Title: adds support for scala Futures & Try

note: this is the new version of an [old pull request](https://github.com/twitter/bijection/pull/115#issuecomment-19991618). this has branch information, and a few more bells and whistles, and is generally nicer.

## motivation
solves twitter#105
@softprops broke out Dispatch's retrying library out into @softprops/retry. I'd like to be able to use it natively with RetryPolicy, from @twitter/util, but they have different types of Futures. I was going to write some Converters in the JavaConverters style, but @softprops suggested going with bijections instead.

## implementation
new bijections:
1. com.twitter.util.Future[A] => scala.concurrent.Future[A]
2. scala.concurrent.Future[A] => scala.concurrent.Future[B]
3. com.twitter.util.Try[A] => scala.util.Try[A]
4. scala.util.Try[A] => scala.util.Try[B]

## testing
I think I tested what I added pretty completely

## scala version
new style scala futures are only in 2.9.3 and 2.10.0+ :(
I upgraded bijections to 2.9.3, and 2.10.2 (2.10.1 and 2.10.2 were bugfix branches, and should be binary compatible)

## weird stuff
I haven't played that much with scala Futures, so I'm not sure if I did the right thing with execution contexts, but I think I did. The Scala Future bijections each require an ExecutionContext, which is a bummer.

## pretty bad issues
tests do not run for 2.10. I suspect this is an exponential bytecode issue, maybe a scalacheck/2.10 problem.

## suggestions
make a separate new-scala-features branch, and publish to 2.9.2 from master, and to 2.9.3 and 2.10 off of new-scala-features