You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Shawn Heisey (JIRA)" <ji...@apache.org> on 2019/04/18 20:02:00 UTC

[jira] [Commented] (HTTPCLIENT-1985) Single version for httpcore, httpclient, httpasyncclient

    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1985?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16821455#comment-16821455 ] 

Shawn Heisey commented on HTTPCLIENT-1985:
------------------------------------------

I am not a member of the development team for HttpComponents.  But I am a part of the team on another java-based Apache project - Lucene/Solr.

I feel pretty sure that the intent with these projects is a very stable API that is fully compatible within the same major version.  The realities of software design say that sometimes there might be bug fixes or new features that require an incompatible API change, but those should be VERY rare as long as you stick to the same major version, and if they do happen it's probably going to be in an internal or experimental API.  The reason that HttpComponents is broken up into separate projects is so that each API can be independently maintained ... if something in httpcore needs fixing, that fix can happen without requiring a whole new version of the client.  If your project needs core http APIs but does not need an actual client, you won't need to include everything.

What this means in practice, because existing APIs rarely change within a major version, is that all you need to do is include the latest release within the same major version for all of the pieces that your project requires.  Grab the latest 4.x.y version of all the parts you need and you'll be fine.  Or the latest 5.x.y version -- which is currently in beta status.

Or you could just let your dependency manager handle it.  The inter-dependencies are carefully written into the software, and if there's ever a problem with that, it's considered a bug.

You mentioned spring boot ... that is NOT released as a single project.  It's got far more pieces than httpcomponents.  In one of my spring boot projects, there are 31 spring jars included, and there are at least four different version numbers involved:

{noformat}
spring-boot-starter-thymeleaf
spring-boot-starter-web
spring-boot-starter-security
spring-boot-starter-jpa
spring-boot-starter-json
spring-boot-starter-aop
spring-boot-starter-jdbc
spring-boot-starter-aop
spring-boot-starter-tomcat
spring-webmvc
spring-security-web
spring-web
spring-security-config
spring-data-jpaspring-boot-autoconfigure
spring-boot
spring-security-core
spring-context
spring-aop
spring-aspects
spring-boot-starter-logging
spring-orm
spring-jdbcspring-data-commons
spring-tx
spring-beans
spring-expression
spring-core
spring-jcl
spring-boot-starter-test
spring-boot-test-autoconfigure
spring-boot-test
spring-test
{noformat}

The build.gradle file for this project has the main spring boot dependency and then five additional spring boot starter dependencies.  And that turns into 31 spring jars plus even more third-party jars.  I never worry all that much about the version numbers, I just tell Gradle what I want and it figures it all out.  That project also includes httpclient.  It takes one line in my build.gradle file, and pulls in a handful of jars.


> Single version for httpcore, httpclient, httpasyncclient
> --------------------------------------------------------
>
>                 Key: HTTPCLIENT-1985
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1985
>             Project: HttpComponents HttpClient
>          Issue Type: Wish
>          Components: HttpClient (async), HttpClient (classic)
>    Affects Versions: 5.0 Beta4
>            Reporter: Sergey Chernov
>            Priority: Major
>   Original Estimate: 96h
>  Remaining Estimate: 96h
>
> Probably this topic was discussed in the mailing list, but I could not find it.
> Anyway, the problem is that there is at least three repos with 3 groups of artifacts: core, client, asyncclient, each group has its own version.
> The site instruction says: just import "org.apache.httpcomponents:httpclient:${httpclient.version}" and be happy (simplified).
> But in fact in a complicated project with big count of dependencies including dozens of artifacts, there can easily be a jar hell with incompatible versions of artifacts.
> If you are good with maven, you understand the power of dependencyManagement or even have a spring-boot-dependencies parent https://github.com/spring-projects/spring-boot/blob/master/spring-boot-project/spring-boot-dependencies/pom.xml for the project.
> Which version of httpasyncclient should you choose if you already have httpclient of version A and httpcore of version B (that can vary in different modules of the multi-module maven project)?
> You have to find a compatible version with core or update everything. Again, you have to understand all these details or just voodoo unless success (that can break application runtime of course).
> It's hard to imagine how many applications and developers suffered because of it.
> I suppose the main reason for this decision was not to release the artifact that is not updated. But it brings more evil, than good.
> Whatever, I hoped that new generation of the http client will unite all three repos to one with single version. Like kotlin, spring-framework, spring-boot or netty. But it's not.
> Why? It's not yet too late before the client 5 is released.
> I bet spring-boot developers will support this idea :D
> Sorry, if it was discussed in the mailing lists or if I should post it there. Please let me know what you think.
> Thanks in any case.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org