Skip to content

Conversation

@dongjoon-hyun
Copy link
Member

@dongjoon-hyun dongjoon-hyun commented Mar 19, 2024

What changes were proposed in this pull request?

This PR aims to exclude logback from SBT dependency like Maven to fix the following SBT issue.

[info]   stderr> SLF4J: Class path contains multiple SLF4J bindings.
[info]   stderr> SLF4J: Found binding in [jar:file:/home/runner/work/spark/spark/assembly/target/scala-2.13/jars/logback-classic-1.2.13.jar!/org/slf4j/impl/StaticLoggerBinder.class]
[info]   stderr> SLF4J: Found binding in [jar:file:/home/runner/.cache/coursier/v1/https/maven-central.storage-download.googleapis.com/maven2/ch/qos/logback/logback-classic/1.2.13/logback-classic-1.2.13.jar!/org/slf4j/impl/StaticLoggerBinder.class]
[info]   stderr> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
[info]   stderr> SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]

Why are the changes needed?

Maven

$ build/mvn dependency:tree --pl core | grep logback
Using `mvn` from path: /opt/homebrew/bin/mvn
Using SPARK_LOCAL_IP=localhost

SBT (BEFORE)

$ build/sbt "core/test:dependencyTree" | grep logback
Using SPARK_LOCAL_IP=localhost
[info]   |       +-ch.qos.logback:logback-classic:1.2.13
[info]   |       | +-ch.qos.logback:logback-core:1.2.13
[info]   |       +-ch.qos.logback:logback-core:1.2.13
[info]   | | +-ch.qos.logback:logback-classic:1.2.13
[info]   | | | +-ch.qos.logback:logback-core:1.2.13
[info]   | | +-ch.qos.logback:logback-core:1.2.13
[info]   | +-ch.qos.logback:logback-classic:1.2.13
[info]   | | +-ch.qos.logback:logback-core:1.2.13
[info]   | +-ch.qos.logback:logback-core:1.2.13

SBT (AFTER)

$ build/sbt "core/test:dependencyTree" | grep logback
Using SPARK_LOCAL_IP=localhost

Does this PR introduce any user-facing change?

No. This only fixes developer and CI issues.

How was this patch tested?

Pass the CIs.

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

No.

@github-actions github-actions bot added the BUILD label Mar 19, 2024
@dongjoon-hyun
Copy link
Member Author

Could you review this dependency PR, @huaxingao ?

@dongjoon-hyun dongjoon-hyun changed the title [SPARK-47468][BUILD] Exclude logback from SBT dependency like Maven [SPARK-47468][BUILD] Exclude logback dependency from SBT like Maven Mar 19, 2024
@dongjoon-hyun
Copy link
Member Author

Could you review this PR, @HyukjinKwon ?

@dongjoon-hyun
Copy link
Member Author

Thank you, @HyukjinKwon . Merged to master.

@huaxingao
Copy link
Contributor

Late LGTM

@dongjoon-hyun
Copy link
Member Author

Thank you, @huaxingao .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants