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 to 2.13 feb 4 [ci: last-only] #8694

Merged
merged 20 commits into from Feb 5, 2020

Conversation

SethTisue
Copy link
Member

@SethTisue SethTisue commented Feb 4, 2020

motivation: get the ASM 7.3.1 upgrade (#8676) onto 2.13.x for testing in the community build

this was straightforward

with the exception of #8400 which I did not attempt to merge myself; I have asked Som to submit a forward-port EDIT: oh, it was already forward ported (#8486)

% git switch -c merge-2.12-to-2.13-feb-4
% git log HEAD --oneline -n 1 | cat
3d4c087c83 Revert invert type signature change (#8471)
% git log origin/2.12.x --oneline -n 1 | cat
31d4d2f7dd Merge pull request #8672 from rorygraves/mike/2.12.x-HashMapLessTupling
% export MB=$(git merge-base @ origin/2.12.x)
% echo $MB
0efdbf75efc76623a89db8b01bdcf0f4dacf01f5
% git log --graph --oneline $MB..origin/2.12.x | cat
*   31d4d2f7dd Merge pull request #8672 from rorygraves/mike/2.12.x-HashMapLessTupling
|\
| * b4683a64be remove tupling for foreach in keySet/values of immutable HashMap and TreeMap
* |   62d67e1653 Export underlying on non-copying conversion (#8674)
|\ \
| * | 3091942b94 [nomerge] Export underlying on non-copying conversion
|  /
* |   8478f1a485 Update ScalaCheck to 1.14.3 (#8659)
|\ \
| * | 3a177082f6 [nomerge] Update ScalaCheck to 1.14.3
|  /
* |   5149f6dcf9 REPL javap under JDK9+ (#8400)
|\ \
| * | 1c5f2050c6 Refactor Javap support to support JDK 9
|  /
* |   5e1c72f280 Merge pull request #8676 from lrytz/asm-7.3.1
|\ \
| * | e626b0476b Update ASM to 7.3.1
| |/
* |   cbd8ffa255 Merge pull request #8677 from dwijnand/212/test/fix-tests-on-jdk11
|\ \
| * | d11ca6acdc [nomerge] Fix some tests on JDK 11
| |/
* |   a1d61d9228 Merge pull request #8673 from hrhino/topic/indy-handles
|\ \
| |/
|/|
| * 1d2930ab9b Thread the needle of static handle ownership
* 0bb5901879 Fix end of range position of Scaladoc use case (#8668)
* dce10489bd Fix end of range position of Scaladoc use case

% git merge a1d61d9228
% git merge -sours cbd8ffa255
% git merge 5e1c72f280
% git merge -sours 31d4d2f7dd

som-snytt and others added 20 commits October 20, 2019 19:13
Repair broken test, command options changed.

The javap tool can be run a few ways from Javap.

For JDK 8, add tools.jar to the class loader and
load the internal Task reflectively.

Otherwise, if we seem to be loaded by the App loader,
so that we can access platform classes, also just
load the internal Task. There is no tools.jar.

Another strategy is to use the ToolProvider interface,
which has the drawback that the REPL output directory
must be a real directory on the class path.

If we are loaded by the bootstrap loader, trying to
load the platform classes will fail. Since the REPL
class loader is a child of the platform loader,
we could use its compiler to compile the task class that
can run the internal tool non-reflectively.

Remove that adapter option that compiled an adapter class
on the REPL class path. Instead, recommend running
`-nobootcp` or `-Yrepl-outdir d -toolcp d`. The first
option makes javap visible to REPL; the second option
makes REPL output visible to the ToolProvider-provided tool.
The invalid end of the range position crashes recent versions
of Zinc.

Manually tested with:

https://github.com/retronym/sbt-scaladoc-aioooe
Fix end of range position of Scaladoc use case
Using `linkedClassOfClass` here doesn't work properly if the owner is a
module without a companion, since the mirror class gets generated during
jvm.

I tried to handle all of the cases I could think of:
- public class Foo { public static void test() {} }:
  - sym.isStaticMember: true
  - sym.owner.internalName: Foo
  - ownerInternalName: Foo
- class Foo; object Foo { def test() { } }
  - sym.isStaticMember: false
  - sym.owner.internalName: Foo$
  - ownerInternalName: Foo
- object Foo { def test() { } }
  - sym.isStaticMember: false
  - sym.owner.internalName: Foo$
  - ownerInternalName: Foo (even though this doesn't exist yet!)
- object Foo { <static> def test() { } }
  - sym.isStaticMember: true
  - sym.owner.internalName: Foo$
  - ownerInternalName: Foo$ (!)
Any `TraversableForwarder` method with the danger of returning
`underlying` itself needs to go through `toList` (which marks the
underlying list as needing to be copied on the next mutation).

Notice that `toStream` is also affected since `List#toStream` builds the
result lazily.

Fixes scala/bug#11869
Thread the needle of static handle ownership
REPL javap under JDK9+
Update ScalaCheck to 1.14.3
Export underlying on non-copying conversion
…Tupling

remove tupling for foreach in keySet/values of immutable HashMap and TreeMap
@scala-jenkins scala-jenkins added this to the 2.13.3 milestone Feb 4, 2020
@SethTisue SethTisue modified the milestones: 2.13.3, 2.13.2 Feb 4, 2020
@SethTisue SethTisue requested a review from lrytz February 4, 2020 19:39
Copy link
Member

@dwijnand dwijnand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

For my learning:

% git merge a1d61d9228
% git merge -sours cbd8ffa255
% git merge 5e1c72f280
% git merge -sours 31d4d2f7dd

Is that how branch merging works? Alternating merge's and merge -sours's?

@lrytz
Copy link
Member

lrytz commented Feb 5, 2020

Yeah, that's our tradition at least :-) The last one I did: #8650.

@lrytz lrytz merged commit 6758038 into scala:2.13.x Feb 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
9 participants