-
Notifications
You must be signed in to change notification settings - Fork 532
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
Fix #617: Make Resource covariant in F and A #731
Fix #617: Make Resource covariant in F and A #731
Conversation
Strange Travis errors, not related to sbt:
Maybe the build needs restarting? |
That's yet another gift from our Ruby dependency. It's fixed in #729. |
@rossabaker Thanks for pointing that out! |
MiMa failures seem to be false positives, lightbend-labs/mima#363 |
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.
Seems reasonable to me, but I'd like to hear from @mpilquist or @SystemFw, who as noted in the linked ticket did similar in fs2.
Note the Ruby change will conflict with #733, which I think is a better solution, but it will be an easy merge for whoever goes second. |
Do we know how this will affect type inference? I can see some extra type annotations in the changes that weren't needed before. |
@LukaJCB
Personally, I use neither |
This is awesome, thank you so much! I want to sort out the false positives on mima so we don't break the master build. I'm not super concerned about the source compatibility issue with |
Hmm that specific problem (type inference of scala> class Applicative[F[_]]
class Applicative
scala> implicit val apList: Applicative[List] = new Applicative[List]
val apList: Applicative[List] = Applicative@2ad7bd26
scala> implicit val apVec: Applicative[Vector] = new Applicative[Vector]
val apVec: Applicative[Vector] = Applicative@149d7cc6
scala> class Resource[+F[_], +A]
class Resource
scala> def resource[F[_], A](implicit ap: Applicative[F]): Resource[F, A] = new Resource
def resource[F[_], A](implicit ap: Applicative[F]): Resource[F,A]
scala> val x: Resource[List, Int] = resource
val x: Resource[List,Int] = Resource@33f81280 I wonder what that means about enhancing lower bounds (but probably not safe in Scala 2 due to LUBs). |
@joroKr21 |
@djspiewak I've added exclusions for MiMa, the build passes now. |
Sorry for the long delay on this. Thanks for all your hard work, @neko-kai! |
Following the discussion in #617 this simply makes Resource covariant. Binary compatibility is not affected as non-generic parts of the method signatures are unchanged.