-
-
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
cats.implicits._ doesn't include Show[Duration] instance #2216
Comments
Not sure, but can we do something for |
We could possibly violate binary compatibility but not cause a problem in this case. The problem is when someone subclasses a trait and we add a method. But I assume no one subclasses these traits. They may, but you can imagine weakening our binary compatibility promise in some cases for traits that are what we might say “package sealed” but accessable in other packages. In fact, this notion of package sealed could be really interesting for other use cases where we only want to prevent subclassing, not access, outside the package. But then maybe we really just want scala to have a more supported method for adding extension methods without routing them through a heirarchy of traits. |
@johnynek in the past I recommended making our instance mix-in traits package-private to ease binary compatibility. However, if I recall correctly, some people didn't want that specifically because they did want to be able to extend the instance mix-in traits. Considering this, we probably shouldn't assume that people aren't subclassing our instance traits. Binary compatibility becomes much less of an issue for the hierarchy-of-traits approach once we only guarantee backwards compatibility for scala 2.12+ (which it sounds like we may do for Cats 2.0). I think that we might be able to pull something like what happened in #2148, but I also am not sure whether it's worth the hassle. I haven't seen anyone complain about missing this instance, it's trivial to create if someone wants it, and |
should be pretty trivial to add it, just let add the |
If it's OK, I'd like to contribute this (add |
I think before we do that, we need to figure out a branching strategy :) |
One PR could do that, and a second one (forking the first one's branch) would move these extensions to |
I think that fixing this would involve a binary incompatibility for scala < 2.12, so we probably can't fix this until Cats 2.0.
The text was updated successfully, but these errors were encountered: