GHC hacking without tears?
Manuel M T Chakravarty
chak at cse.unsw.edu.au
Tue Mar 25 22:53:50 EDT 2008
Tim Chevalier:
> Now, usually the work stoppage is just a matter of waiting for darcs
> to complete. But today the HEAD was broken. so since I didn't know how
> long it was going to take for a patch that fixed it to get checked in,
> I spent a couple hours trying to roll back patches to get into a state
> where I at least had a version of GHC that would build so I could
> continue with other work while waiting for the fix to get checked in.
> This didn't work, so now I'm waiting while a new tree checks out from
> scratch.
>
> Is there a way to insulate myself from GHC breakage (and I realize
> that in the HEAD, a certain amount of breakage is inevitable) while
> still checking in my changes on a regular basis? I see two
> alternatives:
> 1) commit my changes frequently, on a branch and merge it to the HEAD
> at some future time (but past experience has shown that merging it
> later is just too painful)
> 2) never commit my changes until I consider my work "done", then
> commit them all at once (but it generally seems better to commit small
> amounts of code often; plus, this has more or less the same problem
> with merging)
I have two repos, ghc-test and ghc. I develop in ghc and never edit
in ghc-test. (This is important as otherwise, local, non-recorded
edits can make your local validate succeed, although your patches do
break the tree.)
First thing, each morning, I pull into ghc-test and run validate.
When it breaks, I complain on cvs-ghc and unpull the patches I pulled
this morning. (If I am not too busy, I may try to fix the problem,
but that's optional.)
I develop in ghc and record patches there. Then, I push them to ghc-
test and run validate on them. If validates goes through, I push to
darcs.haskell.org.
Once in a while, I pull from ghc-test into ghc.
------
This scheme has a fairly low overhead for me. If ghc-test breaks,
there are usually not that many patches to unpull, and I am somewhat
isolated from head breakages. However, the **most important thing**
is that everybody validates every single patch before pushing. Every
head breakage that we can avoid safes the time of many people.
Manuel
More information about the Cvs-ghc
mailing list