Skip to content

Version 3.2.0 Dependency Hell #49

Description

@jackpf

Hi Statsig team — thanks for the SDK.
We hit an issue after upgrading to com.statsig:serversdk:3.2.0 in a Scala/SBT project that builds a fat jar with sbt-assembly.
assembly fails with duplicate-class merge errors due to mixed Kotlin stdlib artifacts on the classpath (legacy kotlin-stdlib-jdk7/jdk8:1.6.21 + modern kotlin-stdlib:2.2.10).

Error snippet

[error] 20 errors were encountered during merge
[error] java.lang.RuntimeException: deduplicate: different file contents found in the following:
[error] /home/runner/.cache/coursier/v1/https/maven.localproxy.sc%3A42042/sc-repo/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.6.21/kotlin-stdlib-jdk8-1.6.21.jar:kotlin/collections/jd
k8/CollectionsJDK8Kt.class
[error] /home/runner/.cache/coursier/v1/https/maven.localproxy.sc%3A42042/sc-repo/org/jetbrains/kotlin/kotlin-stdlib/2.2.10/kotlin-stdlib-2.2.10.jar:kotlin/collections/jdk8/Collect
ionsJDK8Kt.class
[error] deduplicate: different file contents found in the following:
[error] /home/runner/.cache/coursier/v1/https/maven.localproxy.sc%3A42042/sc-repo/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.6.21/kotlin-stdlib-jdk7-1.6.21.jar:kotlin/internal/jdk7/
JDK7PlatformImplementations$ReflectSdkVersion.class

What we see in dependency resolution

After upgrading to serversdk:3.2.0, sbt evicted / dependencyTree shows:

  • org.jetbrains.kotlin:kotlin-stdlib:2.2.10 (selected)
  • org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21
  • org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.21
    The old jdk7/jdk8 artifacts appear to come transitively via:
  • com.statsig:ip3country:0.1.5
  • org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4
  • org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:1.6.4

Repro (high level)

  1. Add com.statsig:serversdk:3.2.0 to an SBT project using sbt-assembly
  2. Run:
    • sbt evicted
    • sbt dependencyTree
    • sbt assembly
  3. Observe deduplicate failure above.

Request

Could you align Kotlin transitive deps to avoid legacy kotlin-stdlib-jdk7/jdk8 artifacts being pulled alongside Kotlin 2.x stdlib (or otherwise provide guidance on supported assembly setup)?
Happy to provide more details if helpful.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions