Uploaded image for project: 'Apache Sedona'
  1. Apache Sedona
  2. SEDONA-210

1.3.0-incubating doesn't work with Scala 2.12 sbt projects

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.3.0
    • 1.3.1

    Description

      org.apache.sedona:sedona-common@1.3.0-incubating (direct Maven link) is only built for Scala 2.13.x and doesn't include the Scala version suffix. This is problematic due to the inclusion of org.scala-lang.modules:scala-collection-compat, which targets specific Scala versions differently. As a result, sbt fails to build projects against Scala 2.12 with this error:

      2022.12.07 21:46:49 INFO [error] Modules were resolved with conflicting cross-version suffixes in ProjectRef(uri("file:/path/to/project/"), "project"):
      2022.12.07 21:46:49 INFO [error] org.scala-lang.modules:scala-collection-compat _2.12, _2.13

      The offending part of build.sbt looks like this:

      scalaVersion := "2.12.17"
      val SedonaVersion = "1.3.0-incubating"
      val ScalaCompatibleVersion = "2.12"libraryDependencies ++= Seq(
      "org.apache.sedona" %% f"sedona-core-${SparkCompatibleVersion}" % SedonaVersion,
      "org.apache.sedona" %% f"sedona-sql-${SparkCompatibleVersion}" % SedonaVersion
      )

      I was able to work around this by explicitly depending on the correct version of org.scala-lang.modules:scala-collection-compat@2.9.0 and excluding the wrong cross-versioned one:

      libraryDependencies ++= Seq(
      "org.scala-lang.modules" %% "scala-collection-compat" % "2.9.0",
      "org.apache.sedona" %% f"sedona-core-${SparkCompatibleVersion}" % SedonaVersion, // exclude("org.scala-lang.modules", "scala-collection-compat_2.13"),
      "org.apache.sedona" %% f"sedona-sql-${SparkCompatibleVersion}" % SedonaVersion exclude("org.scala-lang.modules", "scala-collection-compat_2.13")
      )

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mojodna Seth Fitzsimmons
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m