-
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
RFC: ~~Merge~~Rename Cabal
and cabal-install
packages
#3965
Comments
Maybe we should take over http://hackage.haskell.org/package/cabal as well. |
@hvr and I had a discussion on IRC about this; the conclusion was that I am basically OK with this as long as we don't have serious plans to actually decouple cabal-install and Cabal (it doesn't seem like it.) There are some things that have to be dealt with to actually make this happen:
|
I wonder how this fits with the plans to separate the solver and hackage-client bits from |
It's the same deal with hackage-security: the executable needs to be able to depend on an external package that depends on Cabal library |
Won't this lead to a large risk of (accidentally or otherwise) increasing coupling between What are the other potential downsides here? I also want to reiterate @23Skidoo 's question here: Won't this just put more roadblocks in the way of the "split solver"[1] plans? (@ezyang: If your comment was an answer to that, then I'm not sure I follow. Could you expand on how it would work?) [1] I'm basically using "split solver" as a proxy for "any useful piece of functionality", the solver being the most obvious example. |
While it wouldn't dramatically impact the I also agree with @BardurArantsson 's point that this will make it far easier to introduce unintended coupling. |
Oh, forgot to mention: Currently the project is dogfooding Are there other upsides I'm missing? |
I don't think it will increase coupling any more than the coupling today. Even today it is effectively not possible to do a cabal-install release without a Cabal release. cabal-install HEAD is only built and tested against Cabal HEAD. If we're serious about decoupling, we need to at least decolocate the two projects.
Today, if we have a set of packages like this:
the dependency solver will fail with the following message:
However, there is no reason why it couldn't find a solution in this case; if you solve for the dependencies of each component in p separately, the solution ends up being non-cyclic. It's a long-standing request, even; see #1768 for a case where someone wants deps for differing components to be solved separately.
Based on discussion with @hvr, he wants to smooth over the bootstrapping experience; so instead of |
If it is about the name, then how about just rename |
I don't think making them components in one package is a good idea. Packages are our unit of distribution, and the thing other packages can depend on. cabal-install can sometimes optimise and omit components in packages it doesn't need, e.g. when it just needs the lib, but that's not something other tools can do, and it's not really part of the Cabal spec (think of distro tools). I'd be quite happy renaming things though, e.g. Cabal -> cabal-lib(rary); cabal-install -> cabal. @BardurArantsson it's not clear to me there's any more or less tendency to spaghetti if code is in separate components in one package vs separate packages in the same repo. |
I'm fine with @mgsloan's suggestion to rename the two packages if this gets consensus; I've talked to @ezyang and we came up with a scheme for this variant: Good thing is, that cabal has long supported case sensitive names; it's just the CLI that autocorrects the letter case if there's no ambiguity. We already have two and that didn't cause any obvious problems. Also, since Cabal 2.0 is going to be a disruptive/breaking release, and we have an implicit So, the concrete scheme then would come down to simply
Obviously, we'd have to make sure that bootstrapping on lnx/win/osx still works in various combinations, and look for places where the package name |
For extra disambiguation, what if the library got its own name? Here's a cute idea: stack ... tall thing ... pyramid ... pyramid scheme ... illegal organization ... cabal. Also the convex hull of a dependency graph laid out sensibly in R^3 with built-in packages pruned is....roughly a pyramid? |
Assigned @hvr to this. I guess if we're going to do this, better be for 2.0. |
Just for the record, as I mentioned in haskell/hackage-server#773, I'm planning to do this for 3.0 (which is what people originally assumed 2.0 to be) |
We really need per-component solving for this, otherwise I consider merging a very bad idea. |
@phadej actually, the plan is to go with a variant of #3965 (comment) as coupling the |
@hvr could you update the title and the first message in the issue. It's very confusing otherwise. |
Cabal
and cabal-install
packagesCabal
and cabal-install
packages
@phadej done |
This is definitely not for |
I don't want to edit this issue, but everytime I run into this issue I need to follow links to comments, which refer further back. Also since "Also, since Cabal 2.0 is going to be a disruptive/breaking release," doesn't apply anymore, that needs to be rethought. So I use my power and close this issue, as in current state it's not clear and not actionable. Also the name if misleading. |
Thanks to nix-local-build & @ezyang's per-component feature we could now finally fix one awkward and hard to explain wart of cabal: if you want the
cabal
executable, you have to install a weirdly named package:instead, we'd want to have
UPDATE See the new strategy described at #3965 (comment)
the part below has been obsoleted
So instead, if we could fold the executable into the
Cabal
package, and then we could simply sayMoreover, thanks to
build-depends
only requesting theCabal
library component, one can safelywithout having the executable build.
This would be more symmetric with the Stack package, http://hackage.haskell.org/package/stack
which also combines executable and library in one package, and provides users with a better story, since you can say
and you get the executable, while if you say
build-depends: stack == 1.2.*
you only get the library.The text was updated successfully, but these errors were encountered: