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 into 2.13.x [ci: last-only] #9206

Merged
merged 84 commits into from
Sep 18, 2020

Conversation

dwijnand
Copy link
Member

$ git log --oneline --graph $(git merge-base 2.12.x 2.13.x)..2.12.x    # see below
$ git merge -sours e32b224ee1
$ git merge c26463c096
$ git merge -sours 5997a61e30
$ git merge aab332980d
$ git merge -sours 4a26288168
$ git merge 3c16136033
$ git merge -sours 529f089f25
$ git merge 490e3e342a
$ git merge -sours 8e73c8c093
$ git merge bde271aae6
$ git merge -sours dc511c34a8
SKIP  *   dc511c34a8 (origin/2.12.x, 2.12.x) Merge pull request #9192 from retronym/t12140-map-merge
      |\
      | * 5a7ef0df3c Fix NPE regression in immutable.HashMap.merge
      |/
^SKIP *   e14e830e0d Merge pull request #9194 from dwijnand/partest-uses-scalap
      |\
      | * f04fcd8486 Add scalap to partest's IJ config
PICK  * |   bde271aae6 Merge pull request #9131 from retronym/ticket-12085
      |\ \
      | |/
      |/|
      | * 4746d541b0 Drop bug compatibility with Java privacy of inner classes
      | * f5ff2107ac Deterministic InnerClass attribute under joint/separate compilation
      | * 54a2bee380 Refactor DeterminismTest to expose internals as an app.
^PICK * |   24f3c54e12 Merge pull request #9163 from dwijnand/exhaust-tuple-unsealed-false-positive
      |\ \
      | * | e5bda188e8 Fix exhaustivity uncheckableType's logic for tuples
^PICK * | |   d3fb332bed Merge pull request #9191 from eatkins/settings-bin-compat
      |\ \ \
      | |_|/
      |/| |
      | * | ce8e3dfbfd Restore binary compatibility for doc.Settings
^PICK * | |   1264f2ae4d Merge pull request #9182 from dwijnand/java-annot-arrays
      |\ \ \
      | * | | 2569ed7e1d Handle NestedAnnotArg from Java sources
^PICK * | | |   73bb6312de Merge pull request #9184 from dwijnand/cleanup/java-parser-annots
      |\ \ \ \
      | |_|/ /
      |/| | |
      | * | | 3ecfc649ee Cleanup JavaParser.annotation
      | |/ /
SKIP  * | |   8e73c8c093 Merge pull request #9190 from lrytz/no-partest-module
      |\ \ \
      | * | | 03999190d4 [nomerge] no longer build external partest module in release scripts
      |/ / /
^SKIP * | |   975a9b65f6 Merge pull request #9102 from mkeskells/2.12.x_DoubleOps
      |\ \ \
      | |/ /
      |/| |
      | * | 95f0ba07d4 don't box primitive values  to call static methods on java.lang.Double/Float/Integer etc don't box primitives to call hashCode/toString copy with trees with side effect add tests to verify no boxing
PICK  * | |   490e3e342a Merge pull request #9179 from retronym/topic/xasync-stability
      |\ \ \
      | * | | 8d913c3dd4 Make async compiler output deterministic
SKIP  * | | |   529f089f25 Merge pull request #9178 from dwijnand/delambda-meth-ref-java-interfaces
      |\ \ \ \
      | * | | | 1b0e8a09c3 Fix -Ydelambdafy:method-ref on a Java annotation
      |/ / / /
^SKIP * | | |   d8f3e8b22b Merge pull request #9169 from dwijnand/2.12/wb-partest
      |\ \ \ \
      | |/ / /
      |/| | |
      | * | | 6651375f73 Drop flagsfile support, port test suite
      | * | | 1c0b8e4104 Kill pos checkfiles
      | * | | 8a125d3fa9 [nomerge][2.12] Welcome back Partest!
      |/ / /
^SKIP * | |   75221266e0 Merge pull request #9091 from mkeskells/2.12.x_array_copy
      |\ \ \
      | |/ /
      |/| |
      | * | 6ae4136d09 simplify mima exceptions
      | * | 31d6481b8a review feedback - use the ClassTag to hold the empty Arrays and WrappedArray
      | * | 7bba932953 simplify signature
      | * | 1fb249c635 Use java.util.Arrays.copyOf to extend or contract arrays, when  the content of the previous array is to be copied into the new Array
PICK  * | |   3c16136033 Merge pull request #8750 from retronym/topic/add-serializable-warnings
      |\ \ \
      | * | | 559f6fbdae Refactor prior fix to module class symbol cache invalidation
      | * | | bce614f1bb Heed warning about cache invalidation after making object Serializable
      |  / /
^PICK * | |   1de5f175c5 Merge pull request #9147 from dwijnand/exhaust-tuple
      |\ \ \
      | * | | 93d1a5e107 Check all bindings exhaustively, e.g. tuples components
SKIP  * | | |   4a26288168 Merge pull request #9159 from dwijnand/2.12/improve-IntelliJ-project-configuration
      |\ \ \ \
      | * | | | ceda795656 Improve IntelliJ project configuration
      | |/ / /
PICK  * | | |   aab332980d Merge pull request #9167 from mkeskells/2.12.x_remove_unneeded_conversion
      |\ \ \ \
      | * | | | 9416cb9066 remove unneeded conversion
      | | |_|/
      | |/| |
SKIP  * | | |   5997a61e30 Merge pull request #8986 from mkeskells/2.12.x_smallMap++
      |\ \ \ \
      | * | | | 3c548a7647 Map ++ without CBF should use the same optimised path as ++ with CBF also optimise for small map addition
      |  / / /
^SKIP * | | |   2838d04545 Merge pull request #9165 from mkeskells/2.12.x_import
      |\ \ \ \
      | |/ / /
      |/| | |
      | * | | 1b02a84e2e remove unused import
      |/ / /
PICK  * | |   c26463c096 Merge pull request #9160 from dwijnand/restarr
      |\ \ \
      | |/ /
      |/| |
      | * | 6c806e025a Add version/scalaVersion info to onLoadMessage
      | * | 67f9cb27a4 Add restarr/restarrFull custom commands
      |/ /
SKIP  * |   e32b224ee1 Merge pull request #9022 from dwijnand/indy-meth-refs
      |\ \
      | * | 7ec7251eed Emit method reference lambdas without helper method
      |  /
^SKIP * |   77f30f97f2 Merge pull request #9119 from ivanopagano/topic/t10035-2.12-backport
      |\ \
      | * | e5175d1e70 Add same changes from the PR #7178
      |/ /
^SKIP * |   ac3fb5f79a Merge pull request #9108 from lrytz/assertUtilBackport
      |\ \
      | * | eee6c24f47 [backport] Exchange stack for Stack in assertNotReachable
      | * | 0160f27ef6 [backport] Avoid race in test for firstCompletedOf
      | * | b3c0fc09c1 [backport] bring AssertUtil fixes to 2.12
      | |/
^SKIP * |   53f8d5ec04 Merge pull request #9116 from retronym/t12067-companion-determinism
      |\ \
      | * | 598bac4e44 Remove exploratory assertions
      | * | 604fc09089 Stabilize order of synthetic modules in enclosing class decls
      |/ /
^SKIP * |   33dd751281 Merge pull request #9115 from retronym/topic/2.12.12-restarr
      |\ \
      | |/
      |/|
      | * 71114c87df Bump to Scala 2.12.12
      |/
^SKIP *   cbe6ade174 (tag: v2.12.12) Merge pull request #9083 from lrytz/smallCleanups
      |\
      | * 5ba248e819 Add a comment to HashMap.castToThat
      | * e675917e22 [nomerge] small cleanups
^SKIP * d332b43d60 Merge pull request #9087 from retronym/topic/reusable-instance-2.12.x
      * 69d55a620e [backport] Disable all reusable instances in runtime reflection
      * 181eb8191a [backport] Rework recent, buggy change to immutable.TreeMap

retronym and others added 30 commits February 25, 2020 16:13
Compiling the enclosed test case with `-Xdev` told me:

```
warning: !!! base trait Serializable not found in basetypes of object Person. This might indicate incorrect caching of TypeRef#parents.
```

Indeed, the `ModuleTypeRef` associated with the newly seralizable
module class had cached the base type sequence prior to the addition
of `Serializable`.

A more serious examination of how we add this parent would be
worthwhile, but for now I'll just do a bandaid job by invalidating
internal caches of the `ModuleTypeRef`.
We need to favour keys from the left that equivalent (but ne),
while favouring values from the right.

(cherry picked from commit abd82a2)
….12.x

[backport] Disable all reusable instances in runtime reflection
…ntent of the previous array is to be copied into the new Array

Use clone when the array is not changing length

Maintain empty Arrays in the Array object, and use them where possible
Maintain empty WrappedArrays in WrappedArrays object and use where possible
Backport of PR 9106.

IteratorTest.`flatMap is memory efficient in previous element` was
copied from 2.13, as the 2.12 version was wrong (started failing with
the fixed `assertThrows`).

The change in AssertThrowsTest is backported from 4eab5e0.
Too slow to leave around.

(cherry picked from commit 9b26381)
[backport] Stabilize order of synthetic modules in enclosing class decls
Previous version ought to have awaited the first
completed of, but using the parasitic context
should suffice; we check that with an assertion.
[backport] bring AssertUtil fixes to 2.12
 * copy the bugfix for scala/bug#10035 to the 2.12.x branch, as-is
…port

Don't recurse without bound in outerPath - 2.12 reloaded
Under -Ydelambdafy:method-ref, when a lambda is just invoking a method
(i.e. is "just a method reference"), such as `foo()` or `x => bar(x)`,
then rather than emit an `invokedynamic` to a helper method that invokes
the target method, emit an `invokedynamic` to the target method
directly.
Emit method reference lambdas without helper method
Add a few missing exclusions, and edit some existing
config that was out of date since the SBT 1.x upgrade.

(cherry picked from commit 7091852)
* `restarr`: sets `scalaVersion` to the version in `/buildcharacter.properties` or the given arg.
* `restarrFull`: publishes locally (without optimizing) & then sets the new `scalaVersion`.
Very handy if you re-STARR and un-STARR a lot, and/or if you're
switching between the 2.12.x and 2.13.x branches, at the cost of extra
output on every build load - a good trade, IMO.
As tuples (e.g. Tuple2) are case classes, for which `enumerateSubtypes`
returns `List(List(tp))` therefore making it "checkable", any tuple type
was accidentally always passing (or at least it has since that `isCase`
branch was added to `enumerateSubtypes`).  This was leading to false
positives in the exhaustivity checking, as a tuple of non-sealed types
was being deemed inexhaustive with a wildcard `(_, _)` counter-example.
* commit 'e32b224ee1':
  Emit method reference lambdas without helper method
  Add same changes from the PR scala#7178
  [backport] Exchange stack for Stack in assertNotReachable
  [backport] Avoid race in test for firstCompletedOf
  Remove exploratory assertions
  Stabilize order of synthetic modules in enclosing class decls
  Bump to Scala 2.12.12
  [backport] bring AssertUtil fixes to 2.12
  Add a comment to HashMap.castToThat
  [nomerge] small cleanups
  [backport] Disable all reusable instances in runtime reflection
  [backport] Rework recent, buggy change to immutable.TreeMap
* commit 'c26463c096':
  Add version/scalaVersion info to onLoadMessage
  Add restarr/restarrFull custom commands
* commit '5997a61e30':
  Map ++ without CBF should use the same optimised path as ++ with CBF also optimise for small map addition
  remove unused import
* commit 'aab332980d':
  remove unneeded conversion
* commit '4a26288168':
  Improve IntelliJ project configuration
* commit '3c16136033':
  Check all bindings exhaustively, e.g. tuples components
  Refactor prior fix to module class symbol cache invalidation
  Heed warning about cache invalidation after making object Serializable
* commit '529f089f25':
  Fix -Ydelambdafy:method-ref on a Java annotation
  Drop flagsfile support, port test suite
  Kill pos checkfiles
  [nomerge][2.12] Welcome back Partest!
  simplify mima exceptions
  review feedback - use the ClassTag to hold the empty Arrays and WrappedArray
  simplify signature
  Use java.util.Arrays.copyOf to extend or contract arrays, when  the content of the previous array is to be copied into the new Array
* commit '490e3e342a':
  Make async compiler output deterministic
* commit '8e73c8c093':
  [nomerge] no longer build external partest module in release scripts
  don't box primitive values  to call static methods on java.lang.Double/Float/Integer etc don't box primitives to call hashCode/toString copy with trees with side effect add tests to verify no boxing
* commit 'bde271aae6':
  Drop bug compatibility with Java privacy of inner classes
  Deterministic InnerClass attribute under joint/separate compilation
  Refactor DeterminismTest to expose internals as an app.
  Handle NestedAnnotArg from Java sources
  Cleanup JavaParser.annotation
  Restore binary compatibility for doc.Settings
  Fix exhaustivity uncheckableType's logic for tuples
* commit 'dc511c34a8':
  Fix NPE regression in immutable.HashMap.merge
  Add scalap to partest's IJ config
@scala-jenkins scala-jenkins added this to the 2.13.4 milestone Sep 14, 2020
@dwijnand
Copy link
Member Author

@retronym mind looking at DeterminismTest.testReferenceToInnerClassMadeNonPrivate please (😴)?

@SethTisue SethTisue added the internal not resulting in user-visible changes (build changes, tests, internal cleanups) label Sep 14, 2020
@dwijnand
Copy link
Member Author

@sjrd The ClassTag change in #9091 that affected Scala.js's build I skipped here, but that might follow in cherry-pick/forward-port PR.

... need to last-mile the flagsfile work in 2.12.x...
Was getting the following in CI, because test/files/neg/t10019-neg.obj
wasn't being created.  The reason it was even going down this route was
because the fatal warnings option was still in a flags file (fix in the
previous commit).

    [error] Uncaught exception when running partest: java.util.concurrent.ExecutionException: java.lang.RuntimeException: Error running /home/travis/build/scala/scala/test/files/neg/t10019.scala
    [error] sbt.ForkMain$ForkError: java.util.concurrent.ExecutionException: java.lang.RuntimeException: Error running /home/travis/build/scala/scala/test/files/neg/t10019.scala
    [error] 	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
    [error] 	at java.util.concurrent.FutureTask.get(FutureTask.java:192)
    [error] 	at scala.tools.partest.nest.AbstractRunner.runTestsForFiles(AbstractRunner.scala:353)
    [error] 	at scala.tools.partest.nest.AbstractRunner.$anonfun$run$17(AbstractRunner.scala:254)
    [error] 	at scala.tools.partest.nest.AbstractRunner.$anonfun$run$17$adapted(AbstractRunner.scala:250)
    [error] 	at scala.collection.ArrayOps$WithFilter.foreach(ArrayOps.scala:73)
    [error] 	at scala.tools.partest.nest.AbstractRunner.$anonfun$run$15(AbstractRunner.scala:250)
    [error] 	at scala.tools.partest.nest.AbstractRunner.run(AbstractRunner.scala:250)
    [error] 	at scala.tools.partest.sbt.PartestTask.execute(Framework.scala:55)
    [error] 	at sbt.ForkMain$Run.lambda$runTest$1(ForkMain.java:304)
    [error] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    [error] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    [error] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    [error] 	at java.lang.Thread.run(Thread.java:748)
    [error] Caused by: sbt.ForkMain$ForkError: java.lang.RuntimeException: Error running /home/travis/build/scala/scala/test/files/neg/t10019.scala
    [error] 	at scala.tools.partest.nest.AbstractRunner.liftedTree1$1(AbstractRunner.scala:312)
    [error] 	at scala.tools.partest.nest.AbstractRunner.runTest(AbstractRunner.scala:310)
    [error] 	at scala.tools.partest.nest.AbstractRunner.$anonfun$runTestsForFiles$2(AbstractRunner.scala:335)
    [error] 	at scala.tools.partest.package$$anon$2.call(package.scala:141)
    [error] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    [error] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    [error] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    [error] 	at java.lang.Thread.run(Thread.java:748)
    [error] Caused by: sbt.ForkMain$ForkError: java.io.IOException: No such file or directory
    [error] 	at java.io.UnixFileSystem.createFileExclusively(Native Method)
    [error] 	at java.io.File.createTempFile(File.java:2026)
    [error] 	at scala.tools.partest.nest.Runner.$anonfun$diffIsOk$2(Runner.scala:425)
    [error] 	at scala.tools.partest.nest.Runner.diffIsOk(Runner.scala:425)
    [error] 	at scala.tools.partest.nest.Runner.checked$1(Runner.scala:537)
    [error] 	at scala.tools.partest.nest.Runner.$anonfun$runNegTest$3(Runner.scala:540)
    [error] 	at scala.tools.partest.nest.Runner.$anonfun$runNegTest$1(Runner.scala:540)
    [error] 	at scala.tools.partest.nest.Runner.runInContext(Runner.scala:437)
    [error] 	at scala.tools.partest.nest.Runner.runNegTest(Runner.scala:532)
    [error] 	at scala.tools.partest.nest.Runner.run(Runner.scala:631)
    [error] 	at scala.tools.partest.nest.AbstractRunner.liftedTree1$1(AbstractRunner.scala:310)
    [error] 	at scala.tools.partest.nest.AbstractRunner.runTest(AbstractRunner.scala:310)
    [error] 	at scala.tools.partest.nest.AbstractRunner.$anonfun$runTestsForFiles$2(AbstractRunner.scala:335)
    [error] 	at scala.tools.partest.package$$anon$2.call(package.scala:141)
    [error] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    [error] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    [error] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    [error] 	at java.lang.Thread.run(Thread.java:748)
@retronym
Copy link
Member

I've added a fix for scala/bug#12156

@dwijnand
Copy link
Member Author

Thanks, Jason!

@dwijnand dwijnand merged commit e11c86b into scala:2.13.x Sep 18, 2020
@dwijnand dwijnand deleted the merge-2.12.x-into-2.13.x branch September 18, 2020 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal not resulting in user-visible changes (build changes, tests, internal cleanups)
Projects
None yet
9 participants