[darcs-users] darcs patch: buggy code: only partially process hunks

David Roundy droundy at darcs.net
Wed Aug 6 18:29:23 UTC 2008


On Wed, Aug 06, 2008 at 11:23:02AM -0700, Jason Dagit wrote:
> I think I've tracked the problem down to these hunks:
> hunk ./src/Darcs/Repository/Internal.lhs 279
> -readPrims s = case readPatch s of
> +readPrims s = case readPatch s :: Maybe (Sealed (Prim C(x )), PackedString)
> of
> hunk ./src/Darcs/Repository/Internal.lhs 281
> -              Just (Sealed p,_) -> Sealed (effect (p :: Patch C(x y)))
> +              Just (Sealed p,_) -> Sealed (effect p)
> 
> I have no idea why I was trying to change it from Patch to Prim but that
> appears to be a big no-no.

It seems reasonable to make this change, but does introduce a bug.
When we write and read FL Prim, there's no way to know if the patch
sequence was truncated, but if we convert to Patch first, then we have
delimiters.  This is only marginally useful, but it's the way we do
it.  It also relates, I should mention, to our need for backwards
compatibility with darcs 1 repositories.

> I've changed it back locally but now steve_and_monica_rollback.sh runs for a
> very long time.  This makes me think my patch has huge impact on
> strictness.  I'm not sure where to begin looking at though.  Changing
> Repository/Internal.lhs had pretty wide effects in terms of working with
> Sealed types and for my experience any of those could be the strictness
> culprit.

Argh.  That's no fun.  Do tests pass in general, though?

> On Tue, Aug 5, 2008 at 10:43 PM, Jason Dagit <dagit at codersbase.com> wrote:
> 
> > See my previous send of this patch for details!
> >
> > Tue Aug  5 22:22:54 PDT 2008  Jason Dagit <dagit at codersbase.com>
> >  * buggy code: only partially process hunks


More information about the darcs-users mailing list