(Before I start: I'm going to use Cabal for Everything that has Cabal in its name and has something to do with Haskell.)
Having had the usual "you need to update X to install Y, but this will break dependency Z" issue again the other day, I thought I'd just ask: why was Cabal not designed to be a full package manager, especially with the following features:
You see where this list is going. Right now, to me Cabal feels like a somewhat sophisticated build system (try finding out which version of Base your package requires when you want to start using it for the first time), that comes with a half-baked package installer.
So the question again: Why wasn't Cabal made a full-featured build/package system? I'm sure there was some design decision that led to the current state.
(This question was somewhat inspired by a rant on Reddit, but contrary to that guy don't mean to offend anyone by the above.) :-)
Installing multiple versions of the same package works perfectly well right now (try cabal install ansi-terminal-0.5.4 && cabal install ansi-terminal-0.5.5
), but installing multiple instances of the same package version doesn't. This is something we'd very much like to support, since that would allow us to implement hermetic builds and solve the "dependency hell" problem, but it's not entirely trivial. There was a GSoC project this year to add support for multiple instances to ghc-pkg and Cabal, but the patches aren't in the mainline yet. Here's a video of the HIW 2012 talk about the project's results, and here's the description of the internal design.
As to your other questions, there actually used to be a cabal upgrade
command for installing the latest versions of all currently installed packages, but it was removed since it could break your installation (again, having support for multiple instances of the same package version would fix this). Uninstallation support has been on the wish list for a while now, it's just that no-one had time to implement it yet. I guess that the same goes for digitally-signed packages and HTTPS.
Additionally, if you're interested in seeing some of these features implemented, patches to Cabal are always welcome, and with the move to GitHub it became easier than ever to contribute code (contributing cash is also fine if you can afford it - I think Well-Typed will be very happy to talk to you about this).
Update (September 2016): for an update on the current state of affairs see this post by Edward Z. Yang: cabal new-build
is a package manager.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With