[
https://issues.apache.org/jira/browse/SEDONA-210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17644534#comment-17644534
]
Jia Yu commented on SEDONA-210:
-------------------------------
I confirmed. This is a bug in 1.3.0-incubating due to the wrong inclusion of
scala-collection-compat in Sedona-common.
> 1.3.0-incubating doesn't work with Scala 2.12 sbt projects
> ----------------------------------------------------------
>
> Key: SEDONA-210
> URL: https://issues.apache.org/jira/browse/SEDONA-210
> Project: Apache Sedona
> Issue Type: Bug
> Affects Versions: 1.3.0
> Reporter: Seth Fitzsimmons
> Priority: Major
>
> {{org.apache.sedona:[email protected]}} ([direct Maven
> link|https://repo1.maven.org/maven2/org/apache/sedona/sedona-common/1.3.0-incubating/])
> 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:[email protected]}} 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")}}
> {{)}}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)