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

Generate static forwarders for object members in companion interface #13573

Merged
merged 1 commit into from
Oct 5, 2021

Conversation

smarter
Copy link
Member

@smarter smarter commented Sep 21, 2021

Same change implemented five years ago in Scala 2:
scala/scala#5131

Fixes #13572.

@smarter smarter requested a review from lrytz September 21, 2021 14:23
@smarter
Copy link
Member Author

smarter commented Sep 21, 2021

Ah yeah, this adds public methods to our API even if they're only visible from Java, so it'll either have to go into a new RC for 3.1.0 (it's a regression from scala 2 but not from scala 3, so not sure if we should backport it) or wait until 3.2 /cc @Kordyjan

@smarter smarter added backport:nominated If we agree to backport this PR, replace this tag with "backport:accepted", otherwise delete it. needs-minor-release This PR cannot be merged until the next minor release labels Sep 21, 2021
@jlprat
Copy link

jlprat commented Sep 22, 2021

My 5cts. I would appreciate if this could go into a new RC for 3.1.0. My reasoning is that Java code using Scala libraries would break when they start using the Scala 3.0 compiled version. This way, the window where the Java compatibility breakage for this case would be minimized to only 3.0.x.

@mdedetrich
Copy link

mdedetrich commented Sep 22, 2021

I also agree with @jlprat , "technically" this may not be a regression of the Scala 3 spec however the whole of Scala is that its meant to work with Java so I would agree with getting this out in 3.1 because otherwise it means that any Scala library compiled with 3.1 potentially cannot work with Java.

There have also been cases (albeit incredibly rare) where a Scala2 release was made that created issues with produced binaries and a re-release was made (and it was basically told to the community to ignore the release).

@Kordyjan Kordyjan added backport:done This PR was successfully backported. and removed backport:nominated If we agree to backport this PR, replace this tag with "backport:accepted", otherwise delete it. labels Oct 4, 2021
Same change implemented five years ago in Scala 2:
scala/scala#5131

Fixes scala#13572.

This PR was backported to 3.1.0-RC3 in scala#13616, this lets us bump the
previousDottyVersion to make the mima checks pass even though this PR
introduces new public member (and while we're at it, we can reset the
mima filter list).
@smarter smarter enabled auto-merge October 5, 2021 12:08
@smarter smarter merged commit a11fdef into scala:master Oct 5, 2021
@smarter smarter deleted the static-trait branch October 5, 2021 13:11
@Kordyjan Kordyjan added this to the 3.1.1 milestone Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:done This PR was successfully backported. needs-minor-release This PR cannot be merged until the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No static forwarder methods in companion of trait
5 participants