-
Notifications
You must be signed in to change notification settings - Fork 701
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
Split dependency solver into a library #3781
Comments
Thanks for creating the issue @grayjay. I'll just summarize my understanding of the thread so any newcomers can hopefully avoid having to re-read the whole thread in detail. The solver modules are currently split out into their own module namespace As I remember/understand it, the main sticking points for splitting out to a new top-level library were:
For the split into an internal library: This should be pretty easy, but needs to wait until all Cabal versions that we want to be able to bootstrap from actually support internal libraries. Motivation: Lets us easily avoid accidentally introducing new dependencies from the solver into cabal-install code. |
BTW, if other people actively want to use this library, have they said they'll contribute any effort? I may have missed it but I've not seen much in the way of contributions to the Cabal lib from the stack maintainers despite the fact that stack greatly relies on it (and Cabal is full of issues/limitations that cause problems for both stack and cabal-install). |
FWIW: I personally want to split solver into a library, to use it for "my own things ™️", but the parsec parser is the first priority atm. |
Can someone clarify what "internal" vs. "top-level" library means? An "internal" libray would be a In any case I'd be willing to contribute work to make the solver accessible as a library. BTW why doesn't cabal-install simply move all its
How long is that expected to take? |
Yes, that's right.
This has been discussed before. There are at least a few of problems with this: a) Suddently everyone and their mother might start depending on cabal-install-the-library, effectively freezing the API[1]. b) The API would be completely ad-hoc and probably just about as usable as the shell commands themselves[2, 3], so effectively nothing would be gained other than just calling cabal-install via the shell. c) Versioning still isn't a solved problem. d) It would lead to unnecessary overhead when developing cabal-install-the-app (mostly solved by new-build, but that still isn't quite ready for prime time.) (See the lengthy discussion threads for more issues and concerns.) [1] Warnings the the API notwithstanding, the risk here is that people just do it anyway and suddenly cabal-install-the-library developers become the Bad Guys when they break the API, nevermind if it's specified as "unstable" (or whatever).
I think the "internal" split will have to wait until 2.0 is out? (Please someone correct me, if I'm wrong about this.) Basically the "anonymous library" functionality will have had to have been part of at least 1-2 stable releases. (For bootstrap reasons, IIRC.) |
It's worth clarifying that the solver split can happen whenever; it's just a "simple" matter of deciding on an API, splitting it out into a separate package, and putting it on a release cycle. |
Maybe not for non-expert users, but all core developers are using it and it's currently the officially recommended way to build Cabal for development. |
@23Skidoo True, true. I'm just going by the fact that I still see various minor tweaks/fixes going in from time to time. :) FTR, I'm also currently using it for all my (non-Cabal) development. |
It might be nice to split the solver into an internal library or new top-level library. See #3222 and commercialhaskell/stack#1615.
The text was updated successfully, but these errors were encountered: