-
Notifications
You must be signed in to change notification settings - Fork 407
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
Restore binary compatibility with 1.14.0 #667
Conversation
dbaeb80 broke binary compatibility by making `BooleanOperators` private, this does not match the plan discussed in typelevel#540: > The 1.15.x series will preserve binary-compatibility with 1.14.0 but is expected to break source-compatibility (e.g. removing the implicit keyword from some definitions) This commit implements that: BooleanOperators is public again but is also made non-implicit.
This comment has been minimized.
This comment has been minimized.
I wrote that I had made the change in #498 (comment). I believe there was a reason for it rather than just removing the implicit. I'll need to try and remember why I did this. I admit that my comment was unfortunately very cryptic.
|
@ashawley OK to merge this? |
I'm just gonna go ahead and merge this. Thanks again @smarter for catching this! |
one tiny source adjustment needed, to adapt to typelevel/scalacheck#667
I remember the motivation now for changing |
Further, changing the implicit to package-private actually is binary compatible. Mima is flagging it as a binary compatible change, but that is only for Java callers, see lightbend-labs/mima#375. It's good that Mima does this for those occasional Scala libraries with downstream Java users. I'm pretty confident we don't have any Java callers, so this Mima check could be ignored. |
Maybe, but before this PR, |
I believe that would emit the same byte code as the example in lightbend-labs/mima#375, but I could re-check. |
It doesn't: package bla
class A {
private[this] def foo: Int = 1
private[bla] def bar: Int = 1
} % scalac A.scala
% javap -p bla/A.class
Compiled from "pp.scala"
public class bla.A {
private int foo();
public int bar();
public bla.A();
} |
So it does. I guess I made the incorrect change, then. I wrongly assumed |
dbaeb80 broke binary compatibility by
making
BooleanOperators
private, this does not match the plan discussedin #540:
This commit implements that: BooleanOperators is public again but is
also made non-implicit.