pan3793 commented on code in PR #52619:
URL: https://github.com/apache/spark/pull/52619#discussion_r2435101360
##########
project/SparkBuild.scala:
##########
@@ -826,6 +829,97 @@ object SparkConnect {
(assembly / assemblyMergeStrategy) := {
case m if m.toLowerCase(Locale.ROOT).endsWith("manifest.mf") =>
MergeStrategy.discard
+ case m if m.toLowerCase(Locale.ROOT).matches("meta-inf.*\\.sf$") =>
MergeStrategy.discard
+ case m if m.toLowerCase(Locale.ROOT).startsWith("meta-inf/services/") =>
MergeStrategy.filterDistinctLines
+ // Drop all proto files that are not needed as artifacts of the build.
+ case m if m.toLowerCase(Locale.ROOT).endsWith(".proto") =>
MergeStrategy.discard
+ case _ => MergeStrategy.first
+ }
+ )
+}
+
+object SparkConnectJdbc {
+ import BuildCommons.protoVersion
+ val buildTestDeps = TaskKey[Unit]("buildTestDeps", "Build needed
dependencies for test.")
+
+ lazy val settings = Seq(
+ // For some reason the resolution from the imported Maven build does not
work for some
+ // of these dependendencies that we need to shade later on.
+ libraryDependencies ++= {
+ val guavaVersion =
+ SbtPomKeys.effectivePom.value.getProperties.get(
+ "connect.guava.version").asInstanceOf[String]
+ Seq(
+ "com.google.guava" % "guava" % guavaVersion,
+ "com.google.protobuf" % "protobuf-java" % protoVersion % "protobuf"
+ )
+ },
+ dependencyOverrides ++= {
Review Comment:
I think we need them, and we'd better keep it consistent with
`connect-client-jvm`
IIRC, sbt prefers to use the highest version of deps, which means if any dep
pulls newer Guava transitively, then SBT will use it, so it's better to
override it explicitly.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]