Skip to content
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

Dependency convergence errors when adding langchain-java as a Maven dependency #129

Closed
bdanielby opened this issue Oct 27, 2023 · 1 comment

Comments

@bdanielby
Copy link

bdanielby commented Oct 27, 2023

Thanks for this great library!
When importing it as a dependency in Maven, we observe the following dependency convergence errors between direct dependencies of langchain-java and indirect ones. We'd be very grateful if you could find a consistent choice of dependencies or use <exclusion>-tags in your pom.xml to avoid the convergence errors. Thank you very much in advance:

Dependency convergence error for io.netty:netty-resolver-dns:jar:4.1.77.Final paths to dependency are:

<our project>
  +-io.github.hamawhitegg:langchain-core:jar:0.2.0:compile
    +-org.redisson:redisson:jar:3.17.3:compile
      +-io.netty:netty-resolver-dns:jar:4.1.77.Final:compile
and
<our project>
  +-io.github.hamawhitegg:langchain-core:jar:0.2.0:compile
    +-io.netty:netty-resolver-dns:jar:4.1.43.Final:compile

[ERROR]
Dependency convergence error for org.apache.commons:commons-collections4:jar:4.3 paths to dependency are:
<our project>
  +-io.github.hamawhitegg:langchain-core:jar:0.2.0:compile
    +-io.milvus:milvus-sdk-java:jar:2.2.9:compile
      +-org.apache.commons:commons-collections4:jar:4.3:compile
and
<our project>
  +-io.github.hamawhitegg:langchain-core:jar:0.2.0:compile
    +-org.apache.commons:commons-collections4:jar:4.4:compile

[ERROR]
Dependency convergence error for io.netty:netty-resolver:jar:4.1.77.Final paths to dependency are:
<our project>
  +-io.github.hamawhitegg:langchain-core:jar:0.2.0:compile
    +-org.redisson:redisson:jar:3.17.3:compile
      +-io.netty:netty-transport:jar:4.1.77.Final:compile
        +-io.netty:netty-resolver:jar:4.1.77.Final:compile
and
<our project>
  +-io.github.hamawhitegg:langchain-core:jar:0.2.0:compile
    +-org.redisson:redisson:jar:3.17.3:compile
      +-io.netty:netty-resolver:jar:4.1.77.Final:compile
and
<our project>
  +-io.github.hamawhitegg:langchain-core:jar:0.2.0:compile
    +-org.redisson:redisson:jar:3.17.3:compile
      +-io.netty:netty-handler:jar:4.1.77.Final:compile
        +-io.netty:netty-resolver:jar:4.1.77.Final:compile
and
<our project>
  +-io.github.hamawhitegg:langchain-core:jar:0.2.0:compile
    +-io.netty:netty-resolver:jar:4.1.43.Final:compile

[ERROR]
Dependency convergence error for io.reactivex.rxjava2:rxjava:jar:2.0.0 paths to dependency are:
<our project>
  +-io.github.hamawhitegg:langchain-core:jar:0.2.0:compile
    +-io.github.hamawhitegg:openai-client:jar:0.2.0:compile
      +-com.squareup.retrofit2:adapter-rxjava2:jar:2.9.0:compile
        +-io.reactivex.rxjava2:rxjava:jar:2.0.0:compile
and
<our project>
  +-io.github.hamawhitegg:langchain-core:jar:0.2.0:compile
    +-io.reactivex.rxjava2:rxjava:jar:2.2.21:compile

[ERROR]
Dependency convergence error for org.apache.httpcomponents:httpcore:jar:4.4.15 paths to dependency are:
<our project>
  +-io.github.hamawhitegg:langchain-core:jar:0.2.0:compile
    +-com.google.api-client:google-api-client:jar:2.2.0:compile
      +-com.google.http-client:google-http-client-apache-v2:jar:1.42.3:compile
        +-org.apache.httpcomponents:httpcore:jar:4.4.15:compile
and
<our project>
  +-io.github.hamawhitegg:langchain-core:jar:0.2.0:compile
    +-com.google.api-client:google-api-client:jar:2.2.0:compile
      +-org.apache.httpcomponents:httpcore:jar:4.4.16:compile

[ERROR]
Dependency convergence error for org.apache.httpcomponents:httpclient:jar:4.5.13 paths to dependency are:
<our project>
  +-io.github.hamawhitegg:langchain-core:jar:0.2.0:compile
    +-com.google.api-client:google-api-client:jar:2.2.0:compile
      +-com.google.http-client:google-http-client-apache-v2:jar:1.42.3:compile
        +-org.apache.httpcomponents:httpclient:jar:4.5.13:compile
and
<our project>
  +-io.github.hamawhitegg:langchain-core:jar:0.2.0:compile
    +-com.google.api-client:google-api-client:jar:2.2.0:compile
      +-org.apache.httpcomponents:httpclient:jar:4.5.14:compile

[ERROR]
Dependency convergence error for io.projectreactor:reactor-core:jar:3.4.13 paths to dependency are:
<our project>
  +-io.github.hamawhitegg:langchain-core:jar:0.2.0:compile
    +-org.redisson:redisson:jar:3.17.3:compile
      +-io.projectreactor:reactor-core:jar:3.4.13:compile
and
<our project>
  +-io.github.hamawhitegg:langchain-core:jar:0.2.0:compile
    +-io.projectreactor:reactor-core:jar:3.5.8:compile
and
<our project>
  +-io.github.hamawhitegg:langchain-core:jar:0.2.0:compile
    +-io.projectreactor.addons:reactor-adapter:jar:3.5.1:compile
      +-io.projectreactor:reactor-core:jar:3.5.4:compile

[ERROR]
Dependency convergence error for org.reactivestreams:reactive-streams:jar:1.0.3 paths to dependency are:
<our project>
  +-io.github.hamawhitegg:langchain-core:jar:0.2.0:compile
    +-io.github.hamawhitegg:openai-client:jar:0.2.0:compile
      +-com.squareup.retrofit2:adapter-rxjava2:jar:2.9.0:compile
        +-org.reactivestreams:reactive-streams:jar:1.0.3:compile
and
<our project>
  +-io.github.hamawhitegg:langchain-core:jar:0.2.0:compile
    +-org.redisson:redisson:jar:3.17.3:compile
      +-org.reactivestreams:reactive-streams:jar:1.0.3:compile
and
<our project>
  +-io.github.hamawhitegg:langchain-core:jar:0.2.0:compile
    +-org.redisson:redisson:jar:3.17.3:compile
      +-io.reactivex.rxjava3:rxjava:jar:3.1.6:compile
        +-org.reactivestreams:reactive-streams:jar:1.0.4:compile

[ERROR]
Dependency convergence error for com.google.http-client:google-http-client-gson:jar:1.42.0 paths to dependency are:
<our project>
  +-io.github.hamawhitegg:langchain-core:jar:0.2.0:compile
    +-com.google.api-client:google-api-client:jar:2.2.0:compile
      +-com.google.oauth-client:google-oauth-client:jar:1.34.1:compile
        +-com.google.http-client:google-http-client-gson:jar:1.42.0:compile
and
<our project>
  +-io.github.hamawhitegg:langchain-core:jar:0.2.0:compile
    +-com.google.api-client:google-api-client:jar:2.2.0:compile
      +-com.google.http-client:google-http-client-gson:jar:1.42.3:compile

[ERROR]
Dependency convergence error for org.apache.commons:commons-text:jar:1.6 paths to dependency are:
<our project>
  +-io.github.hamawhitegg:langchain-core:jar:0.2.0:compile
    +-io.milvus:milvus-sdk-java:jar:2.2.9:compile
      +-org.apache.commons:commons-text:jar:1.6:compile
and
<our project>
  +-io.github.hamawhitegg:langchain-core:jar:0.2.0:compile
    +-org.apache.commons:commons-text:jar:1.10.0:compile

[ERROR]
Dependency convergence error for com.google.http-client:google-http-client:jar:1.42.0 paths to dependency are:
<our project>
  +-io.github.hamawhitegg:langchain-core:jar:0.2.0:compile
    +-com.google.api-client:google-api-client:jar:2.2.0:compile
      +-com.google.oauth-client:google-oauth-client:jar:1.34.1:compile
        +-com.google.http-client:google-http-client:jar:1.42.0:compile
and
<our project>
  +-io.github.hamawhitegg:langchain-core:jar:0.2.0:compile
    +-com.google.api-client:google-api-client:jar:2.2.0:compile
      +-com.google.http-client:google-http-client-apache-v2:jar:1.42.3:compile
        +-com.google.http-client:google-http-client:jar:1.42.3:compile
and
<our project>
  +-io.github.hamawhitegg:langchain-core:jar:0.2.0:compile
    +-com.google.api-client:google-api-client:jar:2.2.0:compile
      +-com.google.http-client:google-http-client:jar:1.42.3:compile
@HamaWhiteGG
Copy link
Owner

Thank you very much for your detailed description. My optimization strategy is as follows:

  1. Set the scope of milvus-sdk-java and redisson to "provided."
  2. Remove netty-resolver and netty-resolver-dns.
  3. Resolve conflicts through exclusions.

Currently, the only remaining conflict is within google-api-client itself. I hope that google-api-client resolves the issue on its own, or I can also set its scope to "provided."

image

HamaWhiteGG added a commit that referenced this issue Nov 30, 2023
Fix dependency convergence errors #129
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants