-
Notifications
You must be signed in to change notification settings - Fork 225
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
[TOREE-556] Support Scala 2.13 #218
base: master
Are you sure you want to change the base?
Conversation
7d29aae
to
2178e20
Compare
@pan3793 what is the status of this pr? |
@lresende I remember the |
Thank you for the updates @pan3793 I did not do much testing, but updated my env to spark 3.4.3 + scala 13 and at least it connects and establishes a spark session... will try to spend more time on validation during the week. |
@@ -43,7 +50,6 @@ ThisBuild / scalacOptions ++= Seq( | |||
"-deprecation", | |||
"-unchecked", | |||
"-feature", | |||
"-Xfatal-warnings", |
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.
To make the code support both Scala 2.12 and 2.13, we have to use some deprecated Scala API, so this scalac flag must be disabled.
object JavaConverters in package collection is deprecated (since 2.13.0): Use `scala.jdk.CollectionConverters` instead
@@ -16,4 +16,6 @@ | |||
*/ | |||
resolvers += Resolver.sonatypeRepo("releases") | |||
|
|||
addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.0" cross CrossVersion.full) | |||
if (scalaBinaryVersion.value == "2.12") { | |||
addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.1" cross CrossVersion.full) |
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.
https://github.com/scalamacros/paradise
In Scala 2.13, the plugin's functionality has been included in the compiler directly under the -Ymacro-annotations flag.
lazy val scala213 = "2.13.8" | ||
lazy val defaultScalaVersion = sys.env.get("SCALA_VERSION") match { | ||
case Some("2.12") => scala212 | ||
case _ => scala213 |
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.
I make Scala 2.13 as the default version
@lresende this PR is ready to review now. |
also cc @requaos |
kindly ping @lresende ~ |
Co-authored-by: Neil Skinner reqpro@requaos.com
Co-authored-by: Cheng Pan chengpan@apache.org
This PR is based on #199, and makes the project compatible with both Scala 2.12 and 2.13.
Usage:
or
or
CI is updated to cover both Scala 2.12 and 2.13 tests. I also tested some basic functionalities locally with the docker environment.