-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Remove unused type parameter for Parallel instances #2789
Conversation
Looks like changing |
@tpolecat How does cats handle binary compatibility breaking changes? |
@Billzabob we made a promise to no breaking binary compatibility on core until Cats 3.0. |
@kailuowang No I don't think it causes any issues so it's probably not worth it to do all that. It was just something I noticed and mentioned on Gitter and someone suggested I make PR to fix it. Does that mean this PR just stays up until 3.0? |
Okay, I will schedule it for 3.0 |
isn't this superceded by @travisbrown 's great observation here: #3012 |
@johnynek I hadn't seen this PR, but the problem isn't removing the type parameter, it's the change from We could go ahead and make this change but without the |
actually, I didn't even look at the diff (like a fool). Sorry, I just read the title and assumed. |
@travisbrown Can you help me understand what you mean by "synthetic public setter"? I thought zero parameter |
@Billzabob They're equivalent in the universal access principle sense—they look the same to callers—but they're implemented differently on the underlying platform, especially in traits, where the initialisation of vals is tricky. The compiler is mapping traits onto JVM interfaces, which don't have instance fields and up until Java 8 didn't even have instance method implementations, and the details of that mapping mean making a |
@Billzabob This is a good catch and I'd personally really like to see this change in 2.0.0. Would you mind opening a new PR that only removes the type parameters? Unfortunately it'll have to happen in two places, since these instances are now part of version-specific code, but if you search for the names you'll find them. |
@Billzabob Hope you don't mind but I took your commit, updated it, and opened #3042, with the hope that we can get this into today's 2.0.0. |
@travisbrown I don't mind at all! Also, thanks for the explanation. |
# Conflicts: # core/src/main/scala/cats/instances/parallel.scala
Codecov Report
@@ Coverage Diff @@
## master #2789 +/- ##
=======================================
Coverage 93.46% 93.46%
=======================================
Files 368 368
Lines 6979 6979
Branches 184 184
=======================================
Hits 6523 6523
Misses 456 456 Continue to review full report at Codecov.
|
Included in #3042, which is now merged. |
No description provided.