Some of our services use scala-steward, so we tend to be very up-to-the-minute. So a bunch of services tried to upgrade to Play 2.7.8 a couple of hours ago, and everything went boom.
The problem appears to be that we routinely extend play.api.mvc.BaseController
in our libraries – we have many stock controllers built on top of that, in various libraries. In every case, if the library is still on Play 2.7.7 or earlier, a service using it, that has upgraded to 2.7.8, is crashing with variations of this error:
java.lang.AbstractMethodError: Method com/rallyhealth/swagger/SwaggerController.play$api$mvc$BaseControllerHelpers$_setter_$defaultFormBinding_$eq(Lplay/api/data/FormBinding;)V is abstract
[info] at com.rallyhealth.swagger.SwaggerController.play$api$mvc$BaseControllerHelpers$_setter_$defaultFormBinding_$eq(SwaggerController.scala)
The precise error depends on the library controller in question, but they’re all basically the same error. They all appear to point to this new line (Controller.scala line 78):
implicit val defaultFormBinding: FormBinding = parse.formBinding(parse.DefaultMaxTextLength)
I confess, I’m not sure why adding this line is causing binary incompatibility, but it certainly appears to be doing so. Very consistently, at the spot where our Play-2.7.8 service instantiates the Play-2.7.7 controller that extends BaseController
, it crashes in this line. When I upgrade one library, compiling my service fails on the next.
I’m not sure what the protocol is for bugs of this nature, and it’s possible that I’m misunderstanding something here, but I think Play 2.7.8 breaks lib/service binary compatibility, and it’s causing some havoc for us…