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

Merge 2.12.x to 2.13.x [ci: last-only] #8405

Merged
merged 31 commits into from Sep 10, 2019

Conversation

retronym
Copy link
Member

@retronym retronym commented Sep 9, 2019

PICK    *   61701c2290 (origin/2.12.x) Merge pull request #8396 from retronym/topic/reflection-thread-safety-tycon
P       |\
P       | * 67e4d95df9 Fix thread safety issue in runtime reflection
P       | * 65122fadf1 Synchronize Symbol.typeSymbol in runtime reflection
SKIP    * |   3797ff9f08 Merge pull request #8397 from retronym/backport/phase-order-regression
S       |\ \
S       | * | f85b3877f8 [backport] A more conservative fix for phase assembly performance.
S       | * | 5d2f04f2d0 [backport] Revert buggy phase assembly optimizations
        | |/
PICK    * |   f93c5c334d Merge pull request #8317 from eed3si9n/wip/foldleft
P       |\ \
P       | * | 1a3e7ca37d [nomerge] Use foldLeft instead of /:
        |  /
SKIP    * |   3973a578d8 Merge pull request #8395 from exoego/2.12.x/panzoom
S       |\ \
S       | |/
S       |/|
S       | * 6981cfa228 Update jquery.panzoom to 3.2.3 which is compatible with jQuery 3.4.x
        |/
PICK    *   d70893c99c Merge pull request #8371 from retronym/faster/object-ref
P       |\
P       | * 5b487b7c98 Avoid ObjectRefs in two hot paths in compiler
P       *   4b81bc5565 Merge pull request #8357 from ashawley/library-rootdoc
P       |\
P       | * 6ca40bd4a8 Add links to GitHub for Scala modules [nomerge]
P       *   cb469a970e Merge pull request #8356 from retronym/ticket/11664-alloc
P       |\
P       | * 2ebec700bb Optimize the classpath implementation
P       | * 33f11d3e33 Benchmark for classpah lookup
P       *   c2a22307e6 Merge pull request #8358 from retronym/faster/all-settings-hashmap
P       |\
P       | * f6bfdf0046 Optimize setting initialization with large classpaths
PICK    *   55fc769b20 Avoid using the "lines" method. (#8333)
P       |\
P       | * 446f5c0752 Avoid using the "lines" method.
        |/
SKIP    * 89c2aec7fc [backport] Fix regression in phase assembly with consecutive ru… (#8347)
S       * 4d241c7bd1 Fix regression in phase assembly with consecutive runsRightAfter

eed3si9n and others added 30 commits August 7, 2019 10:18
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.
Revert "Fix regression in phase assembly with consecutive runsRightAfter"

This reverts commit 4d241c7.

Revert "Log phase levels under scalac -Xshow-phases -Ydebug -Ylog:all"

This reverts commit 759b979.

Revert "A faster compiler phase assembly algorithm"

This reverts commit e83ea44.
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.
@scala-jenkins scala-jenkins added this to the 2.13.2 milestone Sep 9, 2019
@SethTisue
Copy link
Member

https://scala-ci.typesafe.com/job/scala-2.13.x-validate-main/9705/testReport/test.files/run_/colltest1_scala/ scala.tools.partest.sbt.TestFailedThrowable: output differs !! 1 - run/colltest1.scala

@SethTisue SethTisue modified the milestones: 2.13.2, 2.13.1 Sep 9, 2019
@SethTisue SethTisue added the prio:blocker release blocker (used only by core team, only near release time) label Sep 9, 2019
@szeiger
Copy link
Member

szeiger commented Sep 9, 2019

colltest1 just needs an --update-check. The number of deprecation warnings has been reduced by 2 due to the change in the file (replaced two deprecated calls by non-deprecated calls). I didn't dig into the history of the file in 2.12. The same thing should have happened there. I assume the corresponding change wasn't included because the number had already changed so there was a merge conflict.

@SethTisue
Copy link
Member

(marked as blocker since 2.13.1 ought to include everything 2.12.10 does)

@retronym retronym force-pushed the merge/2.12.x-to-2.13.x-20190909 branch from 49a0710 to b6b0788 Compare September 10, 2019 06:46
@retronym
Copy link
Member Author

retronym commented Sep 10, 2019

Restarted a stuck Travis job:

[warn] It would fail on the following inputs: FrameEntry(_, _, _), Incr(_, _, _), IntOp(_, _), Invoke(_, _, _, _, _), InvokeDynamic(_, _, _, _, _), Jump(_, _), Label(_), Ldc(_, _), LineNumber(_, _), LookupSwitch(_, _, _, _), NewArray(_, _, _), Op(_), TableSwitch(_, _, _, _, _), TypeOp(_, _), VarOp(_, _)

[warn]     val assignedInConstr = getMethod(k, "<init>").instructions.filter(_.opcode == Opcodes.PUTFIELD) map {

[warn]                                                                                                         ^

No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.

Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#build-times-out-because-no-output-was-received


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.

@SethTisue
Copy link
Member

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.

@SethTisue
Copy link
Member

ticket on the Travis-CI timeouts: scala/scala-dev#653

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
prio:blocker release blocker (used only by core team, only near release time)
Projects
None yet
9 participants