Skip to content

[Backport] Support Mirrors for local and inner classes. #15874

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

Merged

Conversation

bishabosha
Copy link
Member

@bishabosha bishabosha commented Aug 17, 2022

backports #15847 because otherwise it is a forward source breaking change from 3.2.0 to 3.2.1

recommended by @sjrd

- update child accessibility check for anonymous
  mirrors in whyNotGenericSum. Now check the
  prefix at the callsite can access the child.
- for sum mirrors, compute a new prefix for each
  child from the callsite prefix of the parent,
  see TypeOps.childPrefix. For each child,
  subsititute its prefix at definition with the
  childPrefix using asSeenFrom. For polymorphic
  classes, perform the subsitution on the
  constructor before inferring constraints.
- add tests for issues 13332, 13935, 11174, 12328
- add tests for local/inner classes taken from
  Shapeless for its Generic type, backed
  by mirrors

document mirror changes
@bishabosha bishabosha added this to the 3.2.0 backports milestone Aug 17, 2022
@bishabosha bishabosha requested review from sjrd and Kordyjan August 17, 2022 14:22
@bishabosha bishabosha changed the title Support Mirrors for local and inner classes. [Backport] Support Mirrors for local and inner classes. Aug 17, 2022
@Kordyjan
Copy link
Contributor

@bishabosha Are we 100% sure that it cannot break any existing code?

If we are not sure then I would prefer to run a full community build with that change before the release.

@bishabosha
Copy link
Member Author

bishabosha commented Aug 17, 2022

@Kordyjan I am not aware of thew what the process and requirements to merge this are, all I know is that 3.2.0 code will not be able to depend on 3.2.1 code. The original PR didn't break dotty's community build

@Kordyjan
Copy link
Contributor

Kordyjan commented Aug 17, 2022

Ok, I understand it now after reading the original PR.
It has not caused any new fails in our nightly community build after it was merged into main.

We indeed need this to be released with 3.2.0. So the easiest for us would be to merge it now, then release it with 3.2.0-RC4 and then run the full community build (the one with over 900 projects). If it detects something we will either try to mitigate that somehow and release another RC or just declare we are introducing another breaking change in 3.2.

@Kordyjan Kordyjan enabled auto-merge August 17, 2022 15:07
@mbovel
Copy link
Member

mbovel commented Aug 17, 2022

test performance please

1 similar comment
@mbovel
Copy link
Member

mbovel commented Aug 17, 2022

test performance please

@dottybot
Copy link
Member

performance test scheduled: 10 job(s) in queue, 2 running.

@Kordyjan Kordyjan merged commit c5bb595 into scala:release-3.2.0 Aug 17, 2022
@Kordyjan Kordyjan deleted the mirror-for-inner-classes-backport branch August 17, 2022 15:52
@dottybot
Copy link
Member

performance test failed:

Please check https://dotty-bench.epfl.ch/logs/ for more information

@bishabosha bishabosha added the release-notes Should be mentioned in the release notes label Aug 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes Should be mentioned in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants