cabal and platform-independent haskell installation management (again) (Re: [Haskell-cafe] Re: Ubuntu and ghc)

Ketil Malde ketil at malde.org
Thu Jun 5 03:40:50 EDT 2008


"Claus Reinke" <claus.reinke at talk21.com> writes:

> 1. there are no systems where "packages just work"!
>    there are systems where a few people ensure that
>    many people can live in such an illusion, though.

Exactly.  Integrating Cabal packages into the system package manager
is still non-trivial, and a package maintainer is necessary for this
to work.

Which is why it's rather utopian to hope that all of Hackage can be
found in even the most widely used distributions, since many of those
are way to narrow in scope for somebody to take on the work of
providing package management.  I bet some aren't even maintained, and
possibly don't work with current GHC or Cabal.

But I digress.

> - it isn't sufficient to worry about installation management,
>    one has to worry about integration, lifetime and uninstall
>    management as well. in short, maintain the dependency
>    graphs over any of "install"/"upgrade"/"uninstall".

There is an important difference between Hackage and, say, Ubuntu, and
that is that the latter does releases.  If I use a particular Ubuntu
version, I get a particular GHC version, and a particular version of
some dozens of libraries and applications.  They are all compiled with
that GHC version, tested, and can to a reasonable degree, be expected
to work together.  Sometimes they don't, but the good news is that a
zillion other users are in the same boat (well, even for Haskell, it's
probably dozens, at least), and chances are the bug will be fixed.

If I upgrade to the next version of Ubuntu, I can reasonably expect
all packages to be updated to current versions, and some to be
replaced. 

In contrast, for my packages on Hackage, I'm reasonably
certain it worked on my particular system at the time I uploaded
it.  And dependencies are none too specific - the package might work
with different versions than I compiled with or not.

I think for Cabal to provide the convenience currently afforded by
system package managers, you'd need to do Hackage-wide releases, and
test everything together.  This is a lot of work, but not impossible,
it's what Gnome and KDE does, for instance.  It would probably make
things easier for system package maintainers, too.

Alternatives, like pessimistic dependencies: only exact versions in
cabal files, will probably make you end up with installing every
version of every  package, and still suffer dependency hell.
Exhaustive testing of all version combinations, which will
require a lot of computational resources, even if it could be done
automatically.

--

I generally install most libraries from the distribution's repository,
and let the system worry about updates etc.  I think it's also an
advantage if my programs avoid depending on stuff that's not in the
repo, since it's likely to be is less widely used and maintained.

I install manually the stuff I need the distribution doesn't provide,
and also when I want to look at the code, or just have the latest and
greatest.  I tend to get the darcs version, rather than the Hackage
one, though.  The downside is that I need to reinstall these when I do
a system upgrade, but it's rare enough that it doesn't bother me much,
and chances are that more libraries are provided with my distribution
for every release, so a cleanup is probably a good idea anyway.

Anyway, this works pretty well for me - if I'm living on an illusion,
it's at least a good one. :-)

-k
-- 
If I haven't seen further, it is by standing in the footprints of giants


More information about the Haskell-Cafe mailing list