playframework / play-ws

Standalone Play WS, an async HTTP client with fluent API
https://www.playframework.com/documentation/latest/JavaWS
Apache License 2.0
223 stars 87 forks source link

Inconsistent shading of asynchttpclient #862

Closed bulkazszynka closed 7 months ago

bulkazszynka commented 7 months ago

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.

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

mkurz commented 7 months ago

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:

Actually I though 0efba3c556f65e3ba54c9b0ea9319aa58d86f3aa 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!

mkurz commented 7 months ago

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.

SheliakLyr commented 6 months ago

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

mkurz commented 6 months ago

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.

mkurz commented 6 months ago

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,
)
...