-
Notifications
You must be signed in to change notification settings - Fork 29.1k
[SPARK-35894][BUILD] Introduce new style enforce to not import scala.collection.Seq/IndexedSeq #33085
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
|
Build failed by intention. https://github.com/HeartSaVioR/spark/runs/2913871777?check_suite_focus=true It reports scalastyle failure on master branch: The fix of above things would happen in different PR, #33084 |
|
Test build #140324 has finished for PR 33085 at commit
|
|
cc. @srowen as I see he had been taking care of Scala things. |
|
Probably a reasonable idea. What changes are needed to comply with the rule - are there lots? |
|
No, just two lines for now as the style check caught above in PR description. #33084 will handle the fix. |
|
OK let's merge that and retest this |
|
Kubernetes integration test starting |
|
Test build #140325 has finished for PR 33085 at commit
|
|
Kubernetes integration test status failure |
…collection.Seq/IndexedSeq
|
Rebased to contain #33084 , and fixed one missed spot in this PR. style check should pass now. |
|
Kubernetes integration test starting |
|
Kubernetes integration test status failure |
|
Kubernetes integration test starting |
|
Kubernetes integration test status success |
|
Test build #140327 has finished for PR 33085 at commit
|
|
GA build passed for Scala 2.13 build, and style check with new rule is now passed. @srowen Would it be good to go? |
srowen
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.
Go for it, LGTM
|
Thanks, merging to master! |
What changes were proposed in this pull request?
This PR proposes to add a new scalastyle rule to enforce not importing
scala.collection.Seqandscala.collection.IndexedSeqwhich conflicts withscala.Seqandscala.IndexedSeq.The problem occurs as Scala 2.13 changed the alias of
scala.Seqandscala.IndexedSeq. Before Scala 2.13, they werescala.collection.Seqandscala.collection.IndexedSeq. After Scala 2.13, they becomescala.collection.immutable.Seqandscala.collection.immutable.IndexedSeq.Please refer below doc for more details.
https://docs.scala-lang.org/overviews/core/collections-migration-213.html
Why are the changes needed?
We have seen Seq/IndexedSeq issues on cross-compilation of Scala 2.12 / 2.13. While I'm not sure this can prevent all cases, this will prevent the simple case of breaking cross compilation.
Does this PR introduce any user-facing change?
No change on end user. Contributors will be restricted but shouldn't block them doing the right thing.
How was this patch tested?
Ran scalastyle against current master (before #33084)