Skip to content

Drop unused scala-collection-compat dependency - #7600

Open
bowenliang123 wants to merge 1 commit into
apache:masterfrom
bowenliang123:drop-scala-collection-compat
Open

Drop unused scala-collection-compat dependency#7600
bowenliang123 wants to merge 1 commit into
apache:masterfrom
bowenliang123:drop-scala-collection-compat

Conversation

@bowenliang123

Copy link
Copy Markdown
Contributor

Why are the changes needed?

scala-collection-compat is no longer used anywhere in Kyuubi:

  • No source code references it: grep -rn 'import scala.collection.compat' --include='*.scala' returns zero hits across the entire repo.
  • No transitive dep needs it from us: Iceberg 1.11.0 (current iceberg.version per pom.xml:167) no longer ships scala-collection-compat in its runtime jar; checked iceberg-spark-runtime-3.5_2.12-1.11.0.jar and the scala/collection/compat package is absent.
  • The 2024 pin is stale: the original rationale (commit 550f1fce8, Bump scala-collection-compat to 2.12.0 #6677) was that Iceberg 1.6.1 transitively pulled scala-collection-compat:2.12.0. Iceberg has since moved on.
  • Scala 2.13 path is also unaffected: pom.xml:124 <scala-collection-compat.version> lives outside any profile, so both scala-2.12 and scala-2.13 (lines 2003/2011) shared the same pin. Neither path needs it.

3 hunks across 2 files:

  • pom.xml: drop <scala-collection-compat.version> property
  • pom.xml: drop the corresponding <dependencyManagement> entry
  • extensions/spark/kyuubi-spark-authz/pom.xml: drop the <scope>test</scope> dependency

How was this patch tested?

  • mvn -Pfast clean package -DskipTests -pl extensions/spark/kyuubi-spark-authz -am — 7 modules build cleanly (kyuubi-parent, kyuubi-util, kyuubi-util-scala, kyuubi-common, kyuubi-events, kyuubi-spark-lineage, kyuubi-spark-authz)
  • mvn -pl extensions/spark/kyuubi-spark-authz dependency:tree confirms scala-collection-compat_2.12:2.7.0 still lands on the classpath transitively (via Spark SQL provided scope) — classpath behaviour unchanged, just let Maven dependency mediation pick the version Spark wants instead of pinning an older 2.12.0
  • full unit-test pass via mvn test to follow before merge

Was this patch authored or co-authored using generative AI tooling?

Yes.
Assisted-by: OpenCode with MiniMax-M3

No source file in Kyuubi imports `scala.collection.compat.*`, and
Iceberg 1.11.0 (current `iceberg.version`) no longer depends on this library
for the Scala 2.12 path. The previous pin to 2.12.0 (commit 550f1fc,
\apache#6677) was justified by Iceberg 1.6.1; that no longer applies.

Spark SQL still brings in `scala-collection-compat_2.12` transitively at
`provided` scope (verified via `mvn dependency:tree`), so the
classpath behaviour is unchanged. Removing the explicit declaration lets
Maven dependency mediation follow Spark's version instead of pinning an
older 2.12.0.

3 hunks across 2 files:
- pom.xml: `<scala-collection-compat.version>` property
- pom.xml: dependencyManagement entry
- extensions/spark/kyuubi-spark-authz/pom.xml: test-scope dependency

Verified: `mvn -Pfast clean package -DskipTests -pl extensions/spark/kyuubi-spark-authz -am` passes.
@bowenliang123
bowenliang123 force-pushed the drop-scala-collection-compat branch from ce53ba8 to 1645dca Compare July 30, 2026 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant