-
-
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
Add adaptError override to MonadError #3162
Add adaptError override to MonadError #3162
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3162 +/- ##
==========================================
+ Coverage 93.04% 93.04% +<.01%
==========================================
Files 376 376
Lines 7374 7375 +1
Branches 209 215 +6
==========================================
+ Hits 6861 6862 +1
Misses 513 513
Continue to review full report at Codecov.
|
Okay, I've hacked together a fix for MiMa and while this is the only breakage like this in cats-core, there are a bunch in cats-kernel. Fortunately they're much harder to run into—you have to be doing something like this: import cats.kernel.{Monoid, Semigroup}
object myOptionInstances extends cats.kernel.instances.OptionInstances
object Test {
import myOptionInstances._
import cats.kernel.instances.string._
def main(args: Array[String]): Unit = println(Monoid[Option[String]])
} If you compile this with cats-kernel 2.0.0 and run it with 2.1.0-RC1 you'll get a There are dozens of these, I think all related to prioritization fixes like #3100. I'm working on a PR now. |
I wonder if we need our own binary compatibility test: like we compile with the current version, then run some test load compiled against the previous. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work Travis.
Thanks, @johnynek. Any chance you'd want to review the other part of the bincompat fix (and maybe some of the other PRs in the milestone) so I can publish a not-broken 2.1.0-RC2? |
Apologise for the false negative in MiMa...
It would be a failure of MiMa if this were the outcome (but you should absolutely make the best decision for Cats). I'm going to see if we can do something along these lines within MiMa's test suite, for the suite of changes we believe are binary compatible. (edit: opened lightbend-labs/mima#427 to that end) |
We have a pretty bad binary compatibility breakage in 2.1.0-RC1: if you have cats-effect 2.0.0 and cats-core 2.1.0-RC1, you get the following (on both 2.12 and 2.13):
Or:
And sure enough, if you check the 2.1.0-RC1 jars this synthetic method is missing.
I've confirmed that adding this override reinstates the synthetic method and fixes the issue, or at least this particular manifestation of it.
I don't understand how MiMa didn't catch this, and I'm trying to figure that out now, and to make sure there aren't other changes like this in 2.1.0-RC1. I'll publish an RC2 as soon as I'm confident there aren't more changes like this.
Thanks to @bastewart for catching this issue.