New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename Ning into Ahc #5224
Rename Ning into Ahc #5224
Conversation
Hi @slandelle, Thank you for your contribution! We really value the time you've taken to put this together. Before we proceed with reviewing this pull request, please sign the Typesafe Contributors License Agreement: |
@slandelle we're happy to change the class names to reflect the work of the AsyncHttpClient project. You do great work and we're happy to support you. The changes in the PR look fine to me, but one thing I'd like to see is an easier migration path for our users. When we rename classes we try to keep the old classes around for at least one release. We do the same for config. If we make the change in Play 2.5 then we can remove the old Ning classes and config in Play 2.6 once users have had a chance to migrate their code. A good rule of thumb is that all the config and classes mentioned in our Play 2.4 Scala and Java WS docs should still be usable in Play 2.5. For classes, probably the easiest thing to do is to create some lightweight For config you can use the def parse(): NingWSClientConfig = {
// Helper to read from play.ws.ahc, falling back to play.ws.ning
// with a deprecation warning.
def get[A: ConfigLoader](name: String): A = {
PlayConfig(configuration).getDeprecated[A](s"play.ws.ahc.$name", s"play.ws.ning.$name")
}
val allowPoolingConnection = get[Boolean]("allowPoolingConnection")
val allowSslConnectionPool = get[Boolean]("allowSslConnectionPool")
val ioThreadMultiplier = get[Int]("ioThreadMultiplier")
...
} |
I agree with Rich re the migration changes. I would also suggest renaming |
@richdougherty My next question is: will there be a Play 2.6 w/ AHC? At some point, I expect AHC to be replaced by Akka HTTP. |
The only classes referenced in the documentation I could find are:
Does this mean that other undocumented classes such as |
@slandelle Here's a list of classes I think we should remove and classes we should deprecate. The list is basically the same as your list except I added Java
ScalaNingConfig.scala
NingWS.scala
I think most likely we will continue to use AHC in Play 2.6. We will probably move to Akka HTTP for both client/server in the future but it will take some work to get there and Akka HTTP might need some performance tuning or bug fixing first. I can imagine that will be 6+ months away, i.e. in Play 2.7 or later. |
@richdougherty Thanks for the instructions. Will do in the next days. |
@slandelle excellent thanks. :) |
@richdougherty I updated the PR. Could you please take a look? |
👍! |
Great, thanks! |
Please stop advertising AsyncHttpClient as Ning.
The Ning company hasn't sponsored AsyncHttpClient for many years, and there's almost no single line of code left in there from back then.
It's just like someone was advertising Play! as Zenexity.
Now that Play 2.5 will be using AHC 2 with a new package and maven groupId that no longer mention Ning, it would be great if you could finally use a proper name.
Thanks!