This is an automated email from the ASF dual-hosted git repository.
gurwls223 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 4874b6e2c34a [SPARK-50891][BUILD] Remove the explicit dependency on
`Guava` from `plugins.sbt`
4874b6e2c34a is described below
commit 4874b6e2c34a9af15a6eaf0c8a9caaded6b2f5ba
Author: yangjie01 <[email protected]>
AuthorDate: Mon Jan 20 16:40:07 2025 +0900
[SPARK-50891][BUILD] Remove the explicit dependency on `Guava` from
`plugins.sbt`
### What changes were proposed in this pull request?
This pr aims to remove the explicit dependency on `Guava` from
`plugins.sbt` to minimize the number of modifications needed when upgrading the
Guava version.
### Why are the changes needed?
Reduce the configuration items for defining the Guava version.
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
- Pass GitHub Actions
- Manual check `dev/sbt-checkstyle`, It can work properly.
For example:
https://github.com/apache/spark/blob/1c4cfcb0277d673a3f53b49e74ab74452118da91/core/src/main/java/org/apache/spark/util/collection/unsafe/sort/UnsafeInMemorySorter.java#L217-L220
Remove the line 218 from `UnsafeInMemorySorter.java`( `// checkstyle.off:
RegexpSinglelineJava` )and then execute `dev/sbt-checkstyle`.
**Before**
```
Checkstyle failed at following occurrences:
[error] java.lang.RuntimeException: Severity of checkstyle errors exceeds
project limit
[error] at scala.sys.package$.error(package.scala:30)
[error] at
com.etsy.sbt.checkstyle.Checkstyle$.checkstyle(Checkstyle.scala:86)
[error] at
com.etsy.sbt.checkstyle.CheckstylePlugin$autoImport$.$anonfun$checkstyleTask$1(CheckstylePlugin.scala:57)
[error] at
com.etsy.sbt.checkstyle.CheckstylePlugin$autoImport$.$anonfun$checkstyleTask$1$adapted(CheckstylePlugin.scala:49)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] at
sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:63)
[error] at sbt.std.Transform$$anon$4.work(Transform.scala:69)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:283)
[error] at
sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:24)
[error] at sbt.Execute.work(Execute.scala:292)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:283)
[error] at
sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] at
sbt.CompletionService$$anon$2.call(CompletionService.scala:65)
[error] at
java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] at
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
[error] at
java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] at
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
[error] at
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[error] at java.base/java.lang.Thread.run(Thread.java:840)
[error] (core / checkstyle) Severity of checkstyle errors exceeds project
limit
```
**After**
```
Checkstyle failed at following occurrences:
[error] java.lang.RuntimeException: Severity of checkstyle errors exceeds
project limit
[error] at scala.sys.package$.error(package.scala:30)
[error] at
com.etsy.sbt.checkstyle.Checkstyle$.checkstyle(Checkstyle.scala:86)
[error] at
com.etsy.sbt.checkstyle.CheckstylePlugin$autoImport$.$anonfun$checkstyleTask$1(CheckstylePlugin.scala:57)
[error] at
com.etsy.sbt.checkstyle.CheckstylePlugin$autoImport$.$anonfun$checkstyleTask$1$adapted(CheckstylePlugin.scala:49)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] at
sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:63)
[error] at sbt.std.Transform$$anon$4.work(Transform.scala:69)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:283)
[error] at
sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:24)
[error] at sbt.Execute.work(Execute.scala:292)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:283)
[error] at
sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] at
sbt.CompletionService$$anon$2.call(CompletionService.scala:65)
[error] at
java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] at
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
[error] at
java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] at
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
[error] at
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[error] at java.base/java.lang.Thread.run(Thread.java:840)
[error] (core / checkstyle) Severity of checkstyle errors exceeds project
limit
```
The displayed check results show no difference.
### Was this patch authored or co-authored using generative AI tooling?
No
Closes #49550 from LuciferYang/remove-guava-from-plugins.
Authored-by: yangjie01 <[email protected]>
Signed-off-by: Hyukjin Kwon <[email protected]>
---
project/plugins.sbt | 3 ---
1 file changed, 3 deletions(-)
diff --git a/project/plugins.sbt b/project/plugins.sbt
index 4e1c282dcf31..d2ba7d80df03 100644
--- a/project/plugins.sbt
+++ b/project/plugins.sbt
@@ -21,9 +21,6 @@ addSbtPlugin("software.purpledragon" %
"sbt-checkstyle-plugin" % "4.0.1")
// please check pom.xml in the root of the source tree too.
libraryDependencies += "com.puppycrawl.tools" % "checkstyle" % "10.20.2"
-// checkstyle uses guava 33.3.1-jre.
-libraryDependencies += "com.google.guava" % "guava" % "33.3.1-jre"
-
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "2.3.0")
addSbtPlugin("com.github.sbt" % "sbt-eclipse" % "6.2.0")
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]