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

Redundant dependency on protobuf-java can be removed to solve dependency convergence error #29

Closed
detouched opened this issue Sep 6, 2024 · 2 comments · May be fixed by #30
Closed

Comments

@detouched
Copy link

Enforcer plugin reports dependency convergence issue for Stasig SDK:

Dependency convergence error for com.google.protobuf:protobuf-java:3.25.3 paths to dependency are:
+-org.detouched.playground:statsig:1.0-SNAPSHOT
  +-com.statsig:serversdk:1.25.0
    +-io.grpc:grpc-protobuf:1.66.0
      +-com.google.protobuf:protobuf-java:3.25.3
and
+-org.detouched.playground:statsig:1.0-SNAPSHOT
  +-com.statsig:serversdk:1.25.0
    +-io.grpc:grpc-protobuf:1.66.0
      +-com.google.api.grpc:proto-google-common-protos:2.41.0
        +-com.google.protobuf:protobuf-java:3.25.3
and
+-org.detouched.playground:statsig:1.0-SNAPSHOT
  +-com.statsig:serversdk:1.25.0
    +-com.google.protobuf:protobuf-java:3.24.4

This can be solved by manually excluding transitive dependency on protobuf-java and explicitly adding a direct dependency on it, but this means I'll have to keep an eye on the version compatibility in the future which isn't great.

Since io.grpc:grpc-protobuf already pulls in com.google.protobuf:protobuf-java, it doesn't make much sense to keep an explicit dependency on the latter in Gradle config unless it was added to avoid some vulnerability. I don't think it is the case, so maybe it's worth removing it?

@detouched detouched changed the title Redundant dependency on protobuf-java can be removed to solve dependency convergence Redundant dependency on protobuf-java can be removed to solve dependency convergence error Sep 6, 2024
@xinlili-statsig
Copy link
Contributor

Thanks for reporting, yea, we should be able to remove this dependency explicitly

@xinlili-statsig
Copy link
Contributor

Hi this is fixed with the latest version

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

Successfully merging a pull request may close this issue.

2 participants