HEADS UP: cabal-install repo being merged into cabal repo

Duncan Coutts duncan.coutts at googlemail.com
Sun Jun 19 15:21:48 CEST 2011


In theory this will not break anything...

But just in case, here's an explanation of what's going on so you will
be aware in case you hit any oddities.

What's actually happening

I am about to push over 700 patches into the cabal darcs repository.
This will bring cabal-install into the same repository as the Cabal
library. Each package will live in a subdirectory in the same
repository. The cabal-install repository will then no longer be used.

Existing checkouts of the cabal repo should not be affected, you'll just
notice a lot of patches next time you pull. Any outstanding patches not
yet applied to the Cabal library should also not be affected.

Any outstanding patches not yet applied to the cabal-install tool *will*
be affected. They will no longer apply cleanly in the new merged
repository. I'm not aware of any outstanding unapplied cabal-install
patches but if you do have any that are ready to merge then send them to
me and I'll sort them out.

The background

I decided that it would be useful for the Cabal and cabal-install
packages to live in the same repository. There's a few reasons for this.
In future we want to split both Cabal and cabal-install into more
packages (in particular we want to split the Cabal package into the
declarative bits and the "Simple" build system). Once there are a bunch
of closely related packages it's easier to manage if they are together
in one repo. Also, we want to do some renaming: it's a constant source
of confusion to new users that the 'cabal' program lives not in the
'Cabal' package but in the 'cabal-install' package. Having all the
cabal-related packages in one repo will make it easier to manage
renaming individual packages.

Now cabal-install originally did start out in the main Cabal repo but we
forked the repositories back in 2007. So in a sense what we have here is
a very very long running branch (4 years and 700+ patches) that we're
now re-merging back into the primary cabal branch. But because the
forked branch was never intended to be re-merged, we did things that
make it non-trivial to re-merge like deleting the cabal-install files in
the main cabal branch, and deleting the cabal files in the cabal-install
branch (and other things like creating a README file in each).

darcs rebase

Enter darcs rebase. Ganesh has been working on a new darcs rebase
feature for some time [1]. The basic idea is that as an alternative to
merging and resolving conflicts, we modify the patches we want to apply
so that they apply cleanly.

[1]: http://wiki.darcs.net/Ideas/RebaseStatus

In our case we want to rebase all the cabal-install patches so that they
apply cleanly in the main cabal repo. Partly as a large-scale test of
the new feature, Ganesh has kindly helped by doing the rebase for me.
(While I was able to get most of the way using the current darcs rebase
UI, it turned out to be quite a complex use case due to some clashing
files so there were a few hairy steps that don't yet have a nice UI
which is why it was easier for Ganesh to do it rather than me. Obviously
the hope is in future the UI can be fleshed out so that mortals can do
it too.)

Since we are rebasing the cabal-install patches then any patches outside
of the cabal-install repo will no longer apply in the merged repo
because the identity of the patches will have changed. On the other
hand, patches to the main cabal repo will apply just fine.

Apart from one cabal-install branch that I am aware of and have handled
specially, I don't think there are any other outstanding patches to
cabal-install. If any turn up we'll just have to move them over


More information about the Libraries mailing list