You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by ya...@apache.org on 2025/07/22 12:48:38 UTC

(spark) branch master updated: [SPARK-52916][BUILD] Exclude slf4j-simple from SBT

This is an automated email from the ASF dual-hosted git repository.

yangjie01 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new d029adad91cd [SPARK-52916][BUILD] Exclude slf4j-simple from SBT
d029adad91cd is described below

commit d029adad91cdaf81d832e989075e6b6f75a499f9
Author: Cheng Pan <ch...@apache.org>
AuthorDate: Tue Jul 22 20:48:20 2025 +0800

    [SPARK-52916][BUILD] Exclude slf4j-simple from SBT
    
    ### What changes were proposed in this pull request?
    
    Spark uses log4j2 as logging system, we should exclude other slf4j's implementations from the classpath to avoid potential issues.
    
    ### Why are the changes needed?
    
    ```
    $ build/sbt "sql/test:dependencyTree" | grep slf4j-simple
    [info]   | | | +-org.slf4j:slf4j-simple:1.7.33
    [info]   | | | | +-org.slf4j:slf4j-simple:1.7.33
    [info]   | | | +-org.slf4j:slf4j-simple:1.7.33
    [info]   | | +-org.slf4j:slf4j-simple:1.7.33
    [info]   | | +-org.slf4j:slf4j-simple:1.7.33
    [info]   | | | | +-org.slf4j:slf4j-simple:1.7.33
    [info]   | | | | | +-org.slf4j:slf4j-simple:1.7.33
    [info]   | | | | +-org.slf4j:slf4j-simple:1.7.33
    [info]   | | | +-org.slf4j:slf4j-simple:1.7.33
    [info]   | | | +-org.slf4j:slf4j-simple:1.7.33
    [info]   | | +-org.slf4j:slf4j-simple:1.7.33
    [info]   | | | +-org.slf4j:slf4j-simple:1.7.33
    [info]   | | +-org.slf4j:slf4j-simple:1.7.33
    [info]   | +-org.slf4j:slf4j-simple:1.7.33
    [info]   | +-org.slf4j:slf4j-simple:1.7.33
    [info]   | | +-org.slf4j:slf4j-simple:1.7.33
    [info]   | +-org.slf4j:slf4j-simple:1.7.33
    [info]   | | | +-org.slf4j:slf4j-simple:1.7.33
    [info]   | | | | +-org.slf4j:slf4j-simple:1.7.33
    [info]   | | | +-org.slf4j:slf4j-simple:1.7.33
    [info]   | | +-org.slf4j:slf4j-simple:1.7.33
    [info]   | | +-org.slf4j:slf4j-simple:1.7.33
    ```
    
    BTW, Maven does not pull `slf4j-simple`
    ```
    $ build/mvn dependency:tree -pl sql/core | grep slf4j-simple
    Using `mvn` from path: /Users/chengpan/Projects/apache-spark/build/apache-maven-3.9.11/bin/mvn
    <output nothing>
    ```
    
    ### Does this PR introduce _any_ user-facing change?
    
    No.
    
    ### How was this patch tested?
    
    ```
    $ build/sbt "sql/test:dependencyTree" | grep slf4j-simple
    <output nothing>
    ```
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    No.
    
    Closes #51613 from pan3793/SPARK-52916.
    
    Authored-by: Cheng Pan <ch...@apache.org>
    Signed-off-by: yangjie01 <ya...@baidu.com>
---
 project/SparkBuild.scala | 1 +
 1 file changed, 1 insertion(+)

diff --git a/project/SparkBuild.scala b/project/SparkBuild.scala
index d94e58a5683d..3ef0e174fe78 100644
--- a/project/SparkBuild.scala
+++ b/project/SparkBuild.scala
@@ -1105,6 +1105,7 @@ object ExcludedDependencies {
     libraryDependencies ~= { libs => libs.filterNot(_.name == "groovy-all") },
     excludeDependencies ++= Seq(
       ExclusionRule(organization = "ch.qos.logback"),
+      ExclusionRule("org.slf4j", "slf4j-simple"),
       ExclusionRule("javax.servlet", "javax.servlet-api"))
   )
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org