-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-43849][BUILD] Enable unused imports check for Scala 2.13 #41356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| import org.apache.spark.connect.proto.{ExecutePlanResponse, SqlCommand, StreamingQueryCommand, StreamingQueryCommandResult, StreamingQueryInstanceId, WriteStreamOperationStart, WriteStreamOperationStartResult} | ||
| import org.apache.spark.connect.proto.ExecutePlanResponse.SqlCommandResult | ||
| import org.apache.spark.connect.proto.Parse.ParseFormat | ||
| import org.apache.spark.connect.proto.StreamingQueryCommand |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Scala 2.13 checked them unused as they have already been imports in line 31
|
|
||
| package org.apache.spark.sql.catalyst.expressions | ||
|
|
||
| import scala.collection.{mutable, IterableFactory, IterableOps} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IterableFactory and IterableOps are unused imports
|
cc @dongjoon-hyun @HyukjinKwon FYI |
pom.xml
Outdated
| <arg>-Wconf:cat=unchecked&msg=outer reference:s</arg> | ||
| <arg>-Wconf:cat=unchecked&msg=eliminated by erasure:s</arg> | ||
| <arg>-Wconf:msg=^(?=.*?a value of type)(?=.*?cannot also be).+$:s</arg> | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit. Redundant empty line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @dongjoon-hyun , e80f584 removed it
dongjoon-hyun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, LGTM (Pending CIs)
|
Merged to master. |
|
Thanks @dongjoon-hyun @MaxGekk |
### What changes were proposed in this pull request? This pr aims to enable `unused imports` check for Scala 2.13. There is an exception here for `import scala.language.higherKinds`(Scala 2.13 does not need to import them , while Scala 2.12 must import them), so this pr add two new suppression rules for it. ### Why are the changes needed? Enable `unused imports` check for Scala 2.13. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Pass Github Actions Closes apache#41356 from LuciferYang/SPARK-43849. Authored-by: yangjie01 <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
…gherKinds` and delete the corresponding suppression rule ### What changes were proposed in this pull request? `scala.language.higherKinds` is deprecated and no longer needs to be imported explicitly in Scala 2.13, so this PR removes the imports for scala.language.higherKinds and the corresponding compiler suppression rules. ### Why are the changes needed? In SPARK-43849(#41356), I added compiler suppression rules to allow `unused imports` checks to work with both Scala 2.12 and Scala 2.13. As there is no longer a need to support Scala 2.12, we can now clean them up. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Pass GitHub Actions ### Was this patch authored or co-authored using generative AI tooling? No Closes #43128 from LuciferYang/SPARK-43850. Authored-by: yangjie01 <[email protected]> Signed-off-by: yangjie01 <[email protected]>
What changes were proposed in this pull request?
This pr aims to enable
unused importscheck for Scala 2.13.There is an exception here for
import scala.language.higherKinds(Scala 2.13 does not need to import them , while Scala 2.12 must import them), so this pr add two new suppression rules for it.Why are the changes needed?
Enable
unused importscheck for Scala 2.13.Does this PR introduce any user-facing change?
No.
How was this patch tested?
Pass Github Actions