Skip to content
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-25075] Fix some complilation error scala 2.13 part 1 #29105

Conversation

karolchmist
Copy link
Contributor

What changes were proposed in this pull request?

Adapting the code to Scala 2.13

I didn't find a specific JIRA ticket for it, so I used the umbrella ticket as a reference.

Why are the changes needed?

I'm working on adapting REPL to Scala 2.13.x.

I opened a PR for it, but it was some time ago and the code changed since, with many conflicts in respect to the master branch.

So I think it's better to open first a number of smaller PRs that compile both in Scala 2.12 and 2.13. Once the modules that REPL depends on compile, I'll open a new PR that fixed the REPL itself.

Does this PR introduce any user-facing change?

No

How was this patch tested?

export SBT_MAVEN_PROFILES=scala-2.13
./build/sbt core/compile core/test:compile

Each module has its own commit.

It was compiled Scala 2.12 as well, without the SBT_MAVEN_PROFILES variable set.

@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@@ -653,7 +653,7 @@ private[spark] class SparkSubmit extends Logging {
if (opt.value != null &&
(deployMode & opt.deployMode) != 0 &&
(clusterManager & opt.clusterManager) != 0) {
if (opt.clOption != null) { childArgs += (opt.clOption, opt.value) }
if (opt.clOption != null) { childArgs += opt.clOption += opt.value }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already make core module to pass Scala 2.13 compilation three days ago. Is this required?

cc @srowen

Copy link
Member

@srowen srowen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I don't see that any of those changes are needed to compile?

@niebloomj
Copy link

Woohoo! Nice PR!

@karolchmist
Copy link
Contributor Author

I have these errors below. Is there a CI job testing 2.13? I couldn't find any here nor here...

[error] [warn] /home/karol/workspace/open-source/spark/core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala:656: multiarg infix syntax looks like a tuple and will be deprecated
[error] [warn]         if (opt.clOption != null) { childArgs += (opt.clOption, opt.value) }
[error] [warn] 
[error] [warn] /home/karol/workspace/open-source/spark/core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala:688: multiarg infix syntax looks like a tuple and will be deprecated
[error] [warn]         childArgs += (args.primaryResource, args.mainClass)
[error] [warn] 
[error] [warn] /home/karol/workspace/open-source/spark/core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala:693: multiarg infix syntax looks like a tuple and will be deprecated
[error] [warn]         Option(args.driverMemory).foreach { m => childArgs += ("--memory", m) }
[error] [warn] 
[error] [warn] /home/karol/workspace/open-source/spark/core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala:694: multiarg infix syntax looks like a tuple and will be deprecated
[error] [warn]         Option(args.driverCores).foreach { c => childArgs += ("--cores", c) }
[error] [warn] 
[error] [warn] /home/karol/workspace/open-source/spark/core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala:696: multiarg infix syntax looks like a tuple and will be deprecated
[error] [warn]         childArgs += (args.master, args.primaryResource, args.mainClass)
[error] [warn] 
[error] [warn] /home/karol/workspace/open-source/spark/core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala:719: multiarg infix syntax looks like a tuple and will be deprecated
[error] [warn]         childArgs += ("--primary-py-file", args.primaryResource)
[error] [warn] 
[error] [warn] /home/karol/workspace/open-source/spark/core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala:720: multiarg infix syntax looks like a tuple and will be deprecated
[error] [warn]         childArgs += ("--class", "org.apache.spark.deploy.PythonRunner")
[error] [warn] 
[error] [warn] /home/karol/workspace/open-source/spark/core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala:723: multiarg infix syntax looks like a tuple and will be deprecated
[error] [warn]         childArgs += ("--primary-r-file", mainFile)
[error] [warn] 
[error] [warn] /home/karol/workspace/open-source/spark/core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala:724: multiarg infix syntax looks like a tuple and will be deprecated
[error] [warn]         childArgs += ("--class", "org.apache.spark.deploy.RRunner")
[error] [warn] 
[error] [warn] /home/karol/workspace/open-source/spark/core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala:727: multiarg infix syntax looks like a tuple and will be deprecated
[error] [warn]           childArgs += ("--jar", args.primaryResource)
[error] [warn] 
[error] [warn] /home/karol/workspace/open-source/spark/core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala:729: multiarg infix syntax looks like a tuple and will be deprecated
[error] [warn]         childArgs += ("--class", args.mainClass)
[error] [warn] 
[error] [warn] /home/karol/workspace/open-source/spark/core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala:732: multiarg infix syntax looks like a tuple and will be deprecated
[error] [warn]         args.childArgs.foreach { arg => childArgs += ("--arg", arg) }
[error] [warn] 
[error] [warn] /home/karol/workspace/open-source/spark/core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala:741: multiarg infix syntax looks like a tuple and will be deprecated
[error] [warn]         childArgs += (args.primaryResource, "")
[error] [warn] 
[error] [warn] /home/karol/workspace/open-source/spark/core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala:747: multiarg infix syntax looks like a tuple and will be deprecated
[error] [warn]         childArgs += (args.primaryResource, "")
[error] [warn] 
[error] [warn] /home/karol/workspace/open-source/spark/core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala:749: multiarg infix syntax looks like a tuple and will be deprecated
[error] [warn]         childArgs += (args.primaryResource, args.mainClass)
[error] [warn] 
[error] [warn] /home/karol/workspace/open-source/spark/core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala:775: multiarg infix syntax looks like a tuple and will be deprecated
[error] [warn]           childArgs += ("--arg", arg)
[error] [warn] 
[error] [warn] /home/karol/workspace/open-source/spark/core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala:780: multiarg infix syntax looks like a tuple and will be deprecated
[error] [warn]         childArgs += ("--proxy-user", args.proxyUser)
[error] [warn] 

@srowen
Copy link
Member

srowen commented Jul 14, 2020

There is no 2.13 CI/CD job yet - it doesn't compile, we know that. I'm submitting PRs to get much or all of it to compile, then tests will have to be evaluated.

I'm close to having everything up to REPL compiling which would allow you to at least work on the 2.13 REPL.

Those are warnings, not errors; I think your build is configured to raise them as errors. Let's only focus on errors for now as it's going to be big enough to maintain 2.12/2.13 compatibility without separate source trees already.

@karolchmist
Copy link
Contributor Author

Ok, I won't do any more changes for now so we don't overlap, but please let me know if I can help. Closing this PR.

@dongjoon-hyun
Copy link
Member

Thank you for closing, @karolchmist . Thanks, @srowen .

@karolchmist karolchmist deleted the fix-some-complilation-error-scala-2.13-part-1 branch July 14, 2020 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants