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
[SPARK-33285][CORE][SQL] Fix deprecated compilation warnings of "Auto-application to () is deprecated" in Scala 2.13 #30234
Conversation
cc @srowen this is the first part to fix this compilation warnings, if it's too big, I can split multiple small prs. |
Test build #130567 has finished for PR 30234 at commit
|
Hoo boy that is a lot of code to touch. It sounds like eventually it has to happen for Scala 3 and avoids some deprecation noise. I'm not against it though as usual there is a minor concern about making patches harder to back port from 3.1 to 3.0 because of merge conflicts. |
Kubernetes integration test starting |
Kubernetes integration test status success |
Kubernetes integration test starting |
Kubernetes integration test status success |
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.
@LuciferYang .
After this PR, do we have a way to prevent this compilation warnings?
Test build #130568 has finished for PR 30234 at commit
|
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.
Thank you so much for this PR, @LuciferYang .
However, shall we postpone this until Scala 2.13 becomes the default Scala version in Apache Spark?
It seems that there is no such way now.
Fixed this problem only because there are too many compilation warnings about this and it is compatible with Scala 2.12, and I agree with your suggestion |
Let me take a look at this problem. Maybe we can change the alarm level of the compiler or check-style plugin by modify some configuration |
Kubernetes integration test starting |
Kubernetes integration test status success |
Test build #130680 has finished for PR 30234 at commit
|
@dongjoon-hyun It seems that except for |
Sorry, but what do you mean?
|
seems all case has been fixed except for |
Kubernetes integration test starting |
Kubernetes integration test status success |
Test build #131266 has finished for PR 30234 at commit
|
Kubernetes integration test starting |
Kubernetes integration test starting |
Kubernetes integration test status success |
Kubernetes integration test status success |
Test build #131341 has finished for PR 30234 at commit
|
Test build #131343 has finished for PR 30234 at commit
|
Kubernetes integration test starting |
Kubernetes integration test status success |
Test build #131353 has finished for PR 30234 at commit
|
Kubernetes integration test starting |
Kubernetes integration test status success |
Test build #132764 has finished for PR 30234 at commit
|
Spark SPARK-33775 add some Scalac config to Suppress compilation warnings, no need to fix this now, close it first |
What changes were proposed in this pull request?
The purpose of this pr is to partial resolve SPARK-33285.
Auto-application
is dropped in Scala 3 and deprecated in 2.13.3 (scala/scala#8833) now. So we should add the parens when accessed empty-paren method.For example, if definition as follows:
foo.bar()
is recommend , notfoo.bar
. So the main change of this pr is only add the parens where needed.Why are the changes needed?
eliminate compilation warnings in Scala 2.13
Does this PR introduce any user-facing change?
No
How was this patch tested?
Pass the Jenkins or GitHub Action