Fork me on GitHub

Announcing the release of Finatra 2.9.0

posted by cacoco on 2017-03-13 11:46:08 -0700

Finatra release 2.9.0 is available from Maven Central.

We highly recommend looking through the CHANGELOG for a full rundown of all the changes and fixes.

Major Changes


Scala 2.12 Support

We are now cross-publishing Finatra for both Scala 2.11.8 and Scala 2.12.1. A big thanks to @jcrossley!

Move from grizzled-slf4j to util-slf4j-api

We are beginning the process of standardizing the Twitter OSS libraries on the slf4j-api through the functionality provided by the util-slf4j-api library.

This change should be transparent to end users.

Improved bind[T] testing DSL

We introduced an alternative to using the @Bind binding annotation for binding fields in an integration test (which we call the bind[T] DSL) which is exposed on all the testing utilities:

While useful, using @Bind during testing for overriding bound instances in the object graph has several practical drawbacks that we wanted to address. Specifically, two main issues.

First, any field that accesses the embedded server or application needs to be lazy (or defined within a test method) such that the @Bind mechanism has time to replace the corresponding type in the object graph on server startup. Eager access to the embedded server or application negates the ability of @Bind to function.

Second, the type being bound with @Bind needs to exactly match a type in the object graph in order to replace it (otherwise you would simply be binding a new type). While a simple thing to solve, (by specifying the type on a val) it nonetheless contributes to incorrect usage. The bind[T] DSL is more explicit in this regards.

In this release, we’ve updated the bind[T] DSL to allow binding higher-kinded types which should remove any roadblocks for its wider adoption. Using @Bind should now be considered deprecated.

Important (or why do my tests seem broken)

To support the bind[T] DSL in the c.t.inject.app.TestInjector we have updated the lifecycle of the TestInjector. Previously, a c.google.inject.Injector was returned directly from the TestInjector#apply method. The concrete consequence of the change is that you must now call TestInjector#create to return a c.google.inject.Injector.

Without adding this your tests which use a TestInjector may appear to be broken.


See the Finatra Github page or checkout our User’s Guide for more information on getting started.

– The Finatra Team | forum | @finatra | chat