playframework/play-ws

Inconsistent shading of asynchttpclient

bulkazszynka opened this issue · 5 comments

2.X line of the playframework includes the asynchttpclient library having packages prefixed with play.shaded.ahc. However, in version 3.0 this prefix has been removed from 3 class files i.e.

  • com.typesafe.netty.CancelledSubscriber
  • com.typesafe.netty.HandlerPublisher
  • com.typesafe.netty.HandlerSubscriber

Such inconsistency may lead to compatibility issues for users who upgrade from version 2.9 to 3.0.

Hmm.. Yes I can confirm this is incorrect... Not sure why the play.shaded.ahc. prefix gets removed here...
Actually, the package name in Play 3 changed to org.playframework.netty so what the package really should be is:

  • play.shaded.ahc.org.playframework.netty.CancelledSubscriber
  • play.shaded.ahc.org.playframework.netty.HandlerPublisher
  • play.shaded.ahc.org.playframework.netty.HandlerSubscriber

Actually I though 0efba3c does take care of that, not sure why this does not work.

But yes this needs to be checked and fixed.
Thanks for the report!

Actually my last comment was not entirely correct, the correct package name still should be com.typesafe.netty prefixed with play.shaded.ahc.*, resulting in play.shaded.ahc.com.typesafe.netty.*. Fixed in now in # #863, see comments over there for more explanation.

Hi. We are also impacted by this problem. Is there a release planned with the fix?

Hi. We are also impacted by this problem. Is there a release planned with the fix?

Actually there is nothing holding back a new patch release, so I can do that now.

3.0.2 released: https://github.com/playframework/play-ws/releases/tag/3.0.2

If you are using the Play Framework, you can upgrade yourself until Play 3.0.3 is released:

...
libraryDependencies += ws // or javaWs

// Use latest play-ws release (can be removed when Play 3.0.3 is released)
val playWS = "3.0.2"
libraryDependencies ++= Seq(
  "org.playframework" %% "play-ahc-ws-standalone" % playWS,
  "org.playframework" %% "play-ws-standalone-json" % playWS,
  "org.playframework" %% "play-ws-standalone-xml" % playWS,
  "org.playframework" % "shaded-asynchttpclient" % playWS,
  "org.playframework" % "shaded-oauth" % playWS,
)
...