[darcs-users] darcs patch: Resolve issue1229: strictify checkPristineAgainstSlurpy.

Petr Rockai me at mornfall.net
Wed May 27 13:30:34 UTC 2009


Hi,

while working on darcs-hs, I have started tripping this mysterious issue. It
took a good few hours to debug, but at least it seems to be fixed now. : - (.

The good news is, that I have index-based "darcs record" passing all of the
testsuite now (and the testsuite stresses record much more than it stresses
whatsnew, so that's probably good news).

(The repair.sh test was the last one that had been failing, interestingly
enough, only in those cases when the rest of the suite ran before, never when I
tried to run only the single test...)

Yours,
   Petr.

Wed May 27 15:18:20 CEST 2009  Petr Rockai <me at mornfall.net>
  * Resolve issue1229: strictify checkPristineAgainstSlurpy.
  
  The code in replayRepository' in Darcs.Repository.Repair relies on being able
  to catch exceptions that arise while running checkPristineAgainstSlurpy.
  Unfortunately, due to unsafeInterleaveIO used in the SlurpDirectory code, the
  exception does not get thrown until after the `catchall` is out of scope,
  ie. when the "is_same" condition is evaluated (a supposed pure value, but
  unsafeInterleaveIO has introduced latent exceptions into the equation). Making
  the return from checkPristineAgainstSlurpy strict (using $!) forces execution
  of the interleaved IO and trips the exception in the right context.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/x-darcs-patch
Size: 157683 bytes
Desc: A darcs patch for your repository!
URL: <http://lists.osuosl.org/pipermail/darcs-users/attachments/20090527/bccfa227/attachment-0001.bin>


More information about the darcs-users mailing list