-
Notifications
You must be signed in to change notification settings - Fork 530
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
Replace non-Gen
kernel variants with existential form
#3575
Comments
Wayyyyyyy too much source breakage for a 3.x release. |
I mean, is it? The argument is basically that, in most cases, you would actually want the new |
I have a strong suspicion that scalafix is rarely used when dealing with library upgrades. Instead, someone will want to use a random library downstream, get the cats-effect 3.x upgrade transitively, and manually work through the errors after consulting release notes, issue trackers, chat, etc. |
At least in my experience, most people are either 1) not upgrading anything, 2) tasking some poor soul with big bang upgrading everything once a year or so, or 3) just spinning up Scala Steward (publicly or privately). In all three of these cases, this problem would get caught quickly and directly (either automatically or manually). I think the folks who fall outside this set are a pretty small minority, but I'll admit this is pretty biased by the teams that I've interacted with. |
We have Scala Steward. It doesn't run Scalafix on transitive updates. Whenever Cats Effect releases, a bunch of libraries also release. If we're lucky, we'll get one green needle in the haystack of red. If we didn't depend on CE explicitly, things are just broken and nobody has time to dig out. I can barely get teams to merge their green ones. I want to run into the wilderness and write Perl. |
What are some examples of things that are |
Anything which doesn't use So really the argument here is the fact that almost everyone is over-constraining their function signatures, and by nudging the ecosystem in the right direction we can create a more granular error-handling mechanism. |
Sorry, I meant examples of typeclass instances. |
Oh this wouldn't be an instance definition-side thing. Pretty much all practical instances will be |
Right now,
Concurrent[F[_]] = GenConcurrent[F, Throwable]
. This matches our general opinion of the most common use-case, but there's a second extremely common scenario that we currently don't offer the same convenience around:Concurrent[F, _]
. This is to say, the scenario in which you want concurrency but you don't care about the error handling. Arguably, this is even more common than theThrowable
case.Thinking through possible alias names here, it occurred to me that even
Concurrent
is actually quite inconsistent with theMonadThrow
andMonadCancelThrow
convention. In my opinion, an ideal configuration would be the following:This would also subtly encourage people to default to parametrically ignoring errors whenever possible, and would in turn make the types in downstream declaration sites a lot more helpful.
The fun thing is that we could actually do this in a fully binary compatible fashion! It would, however, break a lot of source code if we just did it blindly, so we would probably want to scalafix the change and encourage people to manually inspect the results.
Opinions wanted.
The text was updated successfully, but these errors were encountered: