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
Merge 2.12.x to 2.13.x [ci: last-only] #8405
Merge 2.12.x to 2.13.x [ci: last-only] #8405
Conversation
retronym
commented
Sep 9, 2019
•
edited
edited
Ref scala/bug#11411 Ref scala#6646 This backports the /: deprecation to aid the transition from 2.12.x to 2.13.x.
If a phase `runsRightAfter` a phase that itself has been merged into `Node` of the phase that _it_ `runsRightAfter`, we need to find that `Node` to merge into. (cherry picked from commit cb7e494)
…la#8347) [backport] Fix regression in phase assembly with consecutive runsRightAfter
PathSetting.hashCode can be expensive when a large classpath is configured. This commit changes `allSettings` into a hash map keyed on the setting name. Using the `Setting` itself (which is mutable!) as hashed element in the old `allSettings: Set[Setting]` seems plain wrong. Derived settings collextions (`visibleSettings` and friends) are now lists, rather than sets.
When attempting to build Scala on one of the newest JDKs (11 or 12) the "lines" method is no longer available. Instead, we need to use linesIterator. - We avoid "toList" if followed by a "mkString" or method that can be applied to the iterator - We try to align with branch 2.13.x
Java 11 introduced a `lines` method to the String class, which has precedence over the `lines` extension method added by StringOps. As a result, the code using that method was failing to compile. This PR repairs that by using `linesIterator` instead. See scala/scala-dev#557 for details.
Optimize setting initialization with large classpaths
- Avoid repeated conversion between package dotted names ("com.foo") and relative paths ("com/foo/") by threading a `PackageName` instance through the aggregate classpath lookup which caches the path name. - Avoid creating result buffers inside of each element of the aggregate classpath by introducing a callback based API that lets `AggregateClasspath` use a single buffer.
Optimize the classpath implementation
Add links for Scala modules in docs
Avoid capturing synthetic patmat vars in closures, etc, which gives rise to an ObjectRef to box the var. There is currently a bug in the pattern matcher that emits these more of these vars under `-optimize` -- the logic was not updated woth `-opt` was introduced in 2.12. Rewrite `RefChecks.transform` in terms of vals to avoid another ObjectRef.
Avoid ObjectRefs in two hot paths in compiler
The stack trace in a customer's bug report suggests that we need this to avoid races between these methods of `TypeSymbol`. ``` private def setTyconCache(tycon: Type) { tyconCache = tycon tyconRunId = currentRunId assert(tyconCache ne null, this) } ``` ``` override def info_=(tp: Type) { tpePeriod = NoPeriod tyconCache = null super.info_=(tp) } ```
Disable the cache of the `SubstMap` used in `Type.subst` when in the runtime reflection universe.
Prune the recursion when we re-visit a node via a shorter path from the initial node. Before: ``` [info] # Run complete. Total time: 00:00:44 [info] Benchmark (size) Mode Cnt Score Error Units [info] PhaseAssemblyBenchmark.assemble 1 avgt 5 1153.587 ± 46.410 ns/op [info] PhaseAssemblyBenchmark.assemble 4 avgt 5 4055.886 ± 891.833 ns/op [info] PhaseAssemblyBenchmark.assemble 8 avgt 5 19886.933 ± 518.378 ns/op [info] PhaseAssemblyBenchmark.assemble 16 avgt 5 768377.075 ± 28072.668 ns/op ``` After: ``` [info] # Run complete. Total time: 00:00:44 [info] Benchmark (size) Mode Cnt Score Error Units [info] PhaseAssemblyBenchmark.assemble 1 avgt 5 1011.742 ± 164.448 ns/op [info] PhaseAssemblyBenchmark.assemble 4 avgt 5 2485.863 ± 482.310 ns/op [info] PhaseAssemblyBenchmark.assemble 8 avgt 5 4333.091 ± 199.798 ns/op [info] PhaseAssemblyBenchmark.assemble 16 avgt 5 9644.064 ± 468.399 ns/op ``` (cherry picked from commit 9717733)
Fix method filtering in Scaladoc 2.12.x - Fix scala/bug#11672
[backport] deprecate symbolic foldLeft (/:)
…ession [backport] Backport phase assembly regression fix
…afety-tycon A pair of thread safety fixes for runtime reflection.
Mostly a no-op as 2.13.x already had the same changes applied in scala#7269 and others.
https://scala-ci.typesafe.com/job/scala-2.13.x-validate-main/9705/testReport/test.files/run_/colltest1_scala/ |
colltest1 just needs an |
(marked as blocker since 2.13.1 ought to include everything 2.12.10 does) |
49a0710
to
b6b0788
Compare
Restarted a stuck Travis job:
Is this something we're seeing from time to time? I think I've seen it once or twice before? We could adjust the timeout. |
I know we've seen timeouts before, but I've never tried to track or investigate them. Especially lately, since general Travis-CI reliability went through a rough patch recently. I'll try to start paying attention again. |
ticket on the Travis-CI timeouts: scala/scala-dev#653 |