-
-
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
Move fs2 Catenable into cats.data #2358
Comments
I'm leery of putting fancy data structures into cats just to have a place to put them. To me, this seems like something that belongs more in a project like dogs. Even |
@djspiewak There's been some similar discussion in #2058. |
I feel like |
I’m +1 on taking it in core. I have previously made my views on this known in #2058 |
@johnynek A lot of this is the poly/mono debate. I will note that I am in agreement with you on things like cats-free, which doesn't really serve a purpose at all since it a) has the same upstream dependences, and b) is version- and compatibility-locked to cats-core. If either of those were false, there would be value in having it separated. In the case of a hypothetical data structures project (such as dogs), b is clearly false, and desirably so. |
👍 for And more generally I'm 👍 for more functional data structures in |
Let's dwell on that point for a second: why isn't dogs working? Is it the limited data structures currently implemented? @stew's restricted availability of free time? The sheer fact that it's a separate dependency? What exactly? |
Yeah I think it hasn't gotten enough attention for people to feel confident using it. If it were a cats module (or just got GC'd over into |
@tpolecat That's part of what I'm afraid of. Huge surface area on API makes compatibility extremely hard, releases slow and bulky and painful. It means that data structure fixes and tweaks (which are quite common!) get conflated with core typeclass fixes and tweaks (which are unbelievably rare). I think cats-effect demonstrates that separate-but-closely-related ecosystem projects can work, it just takes a bit of maintenance attention and a bit more marketing effort. A temporarily unattended project is a temporary problem. Increased API surface area is forever. |
I don't get the sense that it has been a problem for scalaz, although Kenji is some kind of mighty space robot so he may have managed a lot of hassles we never heard about. |
It's been hugely annoying for scalaz, resulting in issues not actually being addressed in things like Also yeah, Kenji is definitely a mighty space robot. |
we (Stripe) just finally executed a fairly painful update to cats 1.1. It was a lot of work, and no one thought it was fun. To me, locking APIs is exactly the value add of stable libraries. I am willing to compromise API beauty for reduced cost on the ecosystem to upgrade. I'm already looking at 2.13, and I'm a bit skeptical I will ever use it. Getting cats to work with it was hard enough. I can't imagine how long it's going to take Stripe (much less someplace like Twitter) to make all the needed changes. Stripe is still mostly on 2.11 (a few repos on 2.12). My point is: the scala community is far too willing to break compatibility, if you ask me. If bringing things into cats makes it harder to change the APIs, I'd say that's a win. As for the objection of bad design and starting to use types in inappropriate places, all I can say there is I hope we have good code review. |
side note: I wish we could communicate the eng-hours cost of breaking APIs back to library authors. Currently there is no real mechanism except hearing that adoption isn't great. I think people would be shocked at the collective eng-hours these breakages cause. |
We haven't been able to agree upon a principled standard to decide whether something should go into
If it's very unlikely to change and very useful/applicable, then we'll probably get more benefit out of moving it in than the risk of future cost. We also need some tooling to quickly start something that is potentially useful but also likely to change. I suggest that we should make
|
Perhaps one solution to help ease the pain and suffering for multi-billion dollar companies might be that said companies invest some of their hard-earned pocket money into the open source projects? It's just not true that there is "no real mechanism"...it's an open community. Just join in the fun. |
This is a bigger can of worms but the short answer is that they often do. Objectively not as much as they should but it still happens, especially in areas of upgrades. In my experience, the problem often boils down to the developers and immediate team leads "in the trenches": they're just not comfortable jumping into OSS like that. Most people don't have a long history of work done on github. Most people aren't on a first-name basis with project maintainers across the ecosystem. Most people are actually pretty intimidated by all of that. It's really no one's fault – this is a very natural reaction, and certainly most Scala project maintainers have done everything in their power to break down those walls – but it is what it is. So what happens then is a company starts working on slowly turning its version of the Titanic from bow heading 2.11 to 2.12. This usually takes the form of some sort of directive or tooling version bump that strongly encourages/pushes/mandates/whatevers. Ultimately, the individual teams end up doing all of the work, and when they ultimately run into missing versions, forced major upgrades to get Scala compatibility (looking at you, ScalaCheck), and so on, their solution is more often than not to punt. Sometimes they remove dependencies entirely. Sometimes they use Ivy Very, very, very rarely do they submit a PR that fixes things. It does happen but almost exclusively when the developer/team-lead in question is someone who has a moderate-to-strong background in OSS and the Scala ecosystem in particular. Stripe has quite a few of those people. Verizon IPTV had even more of them at its peak, and upgrading 2.10 -> 2.11 was a nearly impossible task for them (forget about 2.12). So tldr, what you're suggesting does happen, and when it doesn't it's not necessarily the fault of the company itself (most C-level executives really don't care if you have to put some time into nameless (to them) OSS in order to deliver product). However, even when it does happen, it doesn't solve the problem. Upgrades are hard. Especially in the Scala ecosystem. |
Well I've done my time in companies ten times+ the worth of Twitter, so for sure I get your points. Often, people just aren't allowed to engage with OSS - it really is that simple. But here's a flip: I get paid zero for any work in any programming language, so really, why should I care? I do care about some things, but not about faceless, imaginary things...it's just not possible. |
Answering Kai's questions:
I think
I'd argue it's really useful when working with monoids in e.g. |
@kailuowang On the subject of Let's take a step back from what has happened with dogs specifically and think about what we really want from an ecosystem organizational standpoint. Here's the question I would pose do you: In an ideal world, is it better to have dogs, or cats-data (as part of core)? Imagine a dogs that is as actively maintained and as widely-known as cats-effect. My argument is that this situation is preferable over having a cats-data as part of the core project. If, however, the broad consensus is that having the data structures (not just What I really want is to summon spare time from a hat so that I can give dogs some of the love it deserves… |
Maybe we can convince Haoyi to let us borrow his time machine. |
@djspiewak I see your point. Right now we have mainly 3 options:
Does that summarize our current situation with this specific problem? |
It does. Just so my preferences are clear at a high level:
(1 is a distant last place) Obviously 3 is contingent on being able to resolve the maintenance and stability problems. I really wish I could just straight up volunteer to take it on. I certainly have the interest, I just don't have the time right now (similar to the situation @stew is in, I would assume). |
2, 3, 1 PS: I think Haoyi's time machine is that he doesn't really engage in democratically run projects, and he can quickly make decisions/changes. Secondly, he gets things in a decent shape, and moves on to the next project. I think for long term governance, cats' approach works well, it won't die if any one person leaves, but it does create costs as we struggle through areas where we disagree. I would argue we should have a project lead (Kai?) with a term of say 1 year, then a formal set of committers that can vote on the next maintainer. If we had something like this, we could just agree the maintainer makes the call on an unclear decision. |
I also vote 2,3,1. I'm not sure I like the idea of a "benevolent dictator". I'd rather we actually have something like a formal vote instead. :) |
2, 1, 3 personally with 1 and 3 close.
… On Aug 3, 2018, at 3:05 PM, Luka Jacobowitz ***@***.***> wrote:
I also vote 2,3,1.
I'm not sure I like the idea of a "benevolent dictator". I'd rather we actually have something like a formal vote instead. :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@johnynek In fairness, I think we would all pretty much defer to @kailuowang. I'm not necessarily averse to what you're saying, just pointing out that, at least for the time being, things aren't exactly ambiguous. |
So what is the best way to unblock this issue, given that this should probably happen before fs2 1.0 rolls out? |
Looks like 2 got the majority vote here, also 3 has a contingency issue (dogs maintainence) yet to resolve. |
Maybe it's really stupid, but I feel that |
What about |
I would personally prefer a |
I meant just their names, because of |
👍 for an official cats collections library. I'd avoid calling it cats-data as that conflicts with |
IMO, anything that uses the I don't think |
I would argue that Catenable (or Chain) should potentially be in core because it would show up in typeclasses. For instance on Foldable we have toList but that forces and order of construction. With Catenable/Chain we could do toChain and many structures could more efficiently be created (e.g. pretty much any tree structure not already a linear graph) |
dogs doesn't get attention because nobody is using it, including myself. (I'm not using scala for anything at the moment and haven't been for some time). The reason nobody is using it is likely that it doesn't get any attention, etc. I would love for someone to pay attention to it, I don't have the time or motivation currently |
It would be nice if we had tooling to version and publish all "the typelevel stack" together. We could do that in one large repo, or we could have some tooling and maybe an sbt plugin that allows you to get the right version of all projects in the typelevel stack such that you know they were tested together. I think adding modules to cats proper is a good solution in the mean time, especially for projects that aren't changing super fast. |
@johnynek the vision for sbt-catalyst is to become such a tool to coordinate the typelevel stack releases - with a single bump of sbt-catalysts version, you automatically get the latest releases of all your typelevel dependencies that work together properly. Though we never had the time to implement such a community build in it. |
I have not used sbt-catalysts because it does a lot of stuff I don't understand and it kind of weirds me out. If the only thing it did was provide versions then maybe it would get more uptake. |
Catenable
is a really nice data structure that gives great performance for things like appending. It'd be great to have it incats.data
. @mpilquist agreed that this would be a good idea.The text was updated successfully, but these errors were encountered: