Skip to content

[WIP][SPARK-31168][BUILD] Upgrade Scala to 2.12.12#29124

Closed
wangyum wants to merge 1 commit intoapache:masterfrom
wangyum:SPARK-31168
Closed

[WIP][SPARK-31168][BUILD] Upgrade Scala to 2.12.12#29124
wangyum wants to merge 1 commit intoapache:masterfrom
wangyum:SPARK-31168

Conversation

@wangyum
Copy link
Member

@wangyum wangyum commented Jul 15, 2020

What changes were proposed in this pull request?

This PR(SPARK-31168) upgrade Scala from 2.12.10 to 2.12.12.

Scala 2.12.11 release notes:
Highlights

  • Performance improvements in the collections library
  • Performance improvements in the compiler
  • Improvements to -Yrepl-class-based, an alternative internal REPL encoding that avoids deadlocks
  • A new -Yrepl-use-magic-imports flag that avoids deep class nesting in the REPL, which can lead to deteriorating performance in long sessions
  • Fix some toX methods that could expose the underlying mutability of a ListBuffer-generated collection

JDK 9+ support

  • ASM was upgraded to 7.3.1, allowing the optimizer to run on JDK 13+
  • :javap in the REPL now works on JDK 9+

Scala 2.12.12 release notes:
Highlights
This release adds compiler support for scala-async and backports substantial performance improvements to collections.

  • The compiler now includes a phase that performs the transformation for the async/await DSL for working with Scala Futures.
    This transform is based on the macro implementation in scala-async but has been substantially rewritten to fix some
    long standing bugs, reduce the overhead of compilation and simplify the extension points for third party effect systems.
    scala-async 1.0.0 will be released shortly building atop this phase.
  • immutable.{TreeSet, TreeMap} are now based on a backport of the 2.13.x implementation.
  • The builders for immutable.{HashMap, HashSet} are more efficient -- they now use mutation during building to reduce memory churn.

Further highlights

  • Minor improvements to compiler performance. The allocation rate of the compiler is reduced by 10%.

Why are the changes needed?

Improvement performance.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Exist test.

@dongjoon-hyun
Copy link
Member

Thanks, @wangyum .
cc @srowen

@srowen
Copy link
Member

srowen commented Jul 15, 2020

I feel like there was some reason we couldn't update to 2.12.11; not sure if it's still an issue or not. Tests will help tell. Yes, generally fine otherwise to update.

@dongjoon-hyun
Copy link
Member

dongjoon-hyun commented Jul 15, 2020

The failure looks consistent. Could you take a look at that, @wangyum ?

[info] org.apache.spark.serializer.KryoSerializerSuite *** ABORTED *** (324 milliseconds)
[info]   java.lang.NoSuchFieldError: numNonEmptyBlocks
[info]   at org.apache.spark.scheduler.HighlyCompressedMapStatus.<init>(MapStatus.scala:174)

That might be another Scala bug.

@SparkQA
Copy link

SparkQA commented Jul 15, 2020

Test build #125879 has finished for PR 29124 at commit 3adc82a.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@dongjoon-hyun dongjoon-hyun marked this pull request as draft July 16, 2020 17:07
@rednaxelafx
Copy link
Contributor

Just a note: both -Yrepl-class-based and -Yrepl-use-magic-imports are very nice improvements to the Scala REPL, and I'd love to see them in Spark. But they can also potentially significantly impact how Spark's Scala REPL interact, so I wonder whether or not we need some more tests cases to show that the REPL behavior is consistent / has not regressed with regards to them. The test coverage in Spark's RPEL is quite weak...

@dongjoon-hyun
Copy link
Member

Hi, @wangyum . Could you resolve the conflicts? Or, do you think we need to skip 2.12.12 like 2.12.11? If then, please update JIRA.

@dongjoon-hyun
Copy link
Member

Given the current status, do we need to skip Scala 2.12.12 like 2.12.11, too?

@wangyum
Copy link
Member Author

wangyum commented Jul 26, 2020

Yes. We should skip Scala 2.12.12. At least this bug should be fixed first: scala/bug#12096

@wangyum wangyum closed this Jul 26, 2020
@wangyum wangyum deleted the SPARK-31168 branch July 26, 2020 12:08
@dongjoon-hyun
Copy link
Member

Thank you so much for the investigation, @wangyum !

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