-
Notifications
You must be signed in to change notification settings - Fork 29.3k
[SPARK-58200][BUILD] Add a scala-3 build profile and make the version switch reversible #57343
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
base: master
Are you sure you want to change the base?
Changes from all commits
8dc89f5
9eaa481
0f295cb
696abb3
8cdf3cd
bef2338
ff746e3
9dc6399
b254cd3
be8cee0
242974a
247e857
1fb811c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -56,7 +56,7 @@ private object ConfigHelpers { | |
|
|
||
| def toEnum[E <: Enum[E]](s: String, enumClass: Class[E], key: String): E = { | ||
| enumClass.getEnumConstants.find(_.name().equalsIgnoreCase(s.trim)) match { | ||
| case Some(enum) => enum | ||
| case Some(e) => e | ||
| case None => throw configOutOfRangeOfOptionsError(key, s, enumClass.getEnumConstants) | ||
| } | ||
| } | ||
|
|
@@ -155,7 +155,7 @@ private[spark] class TypedConfigBuilder[T]( | |
| import ConfigHelpers._ | ||
|
|
||
| def this(parent: ConfigBuilder, converter: String => T) = { | ||
| this(parent, converter, { v: T => v.toString }) | ||
| this(parent, converter, { (v: T) => v.toString }) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ditto. Is this a source-code-level breaking change of Scala 3?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The old syntax is no longer valid in Scala 3. Those two code changes are slightly out of scope for this PR. But without them, only a few Scala files can be compiled. Happy to split them into a separate PR if you prefer this PR to stay free of source changes.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IIRC, there exists some PRs (before this PR) for this kind of breaking Scala 3 language change.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| } | ||
|
|
||
| /** Apply a transformation to the user-provided values of the config entry. */ | ||
|
|
||
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.
Why do we change like this, @fangchenli ?
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.
enumis a keyword in Scala 3.