[darcs-users] darcs patch: Account for darcs with buggy --exact-version.

Eric Kow kowey at darcs.net
Wed Sep 1 22:08:28 UTC 2010


This is my fourth attempt at addressing Zooko's darcs-benchmark problems.

This time, I've managed to artificially induce darcs to produce --exact-version
output we can't parse (I don't know what's causing his exact situation, so I
replaced the context string in a Version.hs with "blah").  Having done so, I
was able to reproduce the pattern match error he reported and also confirm that
with this patch, darcs-benchmark produces a report.

So I can't guarantee that this is the magic patch that will fix all the problems
-- I may still have gotten something else wrong, or there may still be yet another
bug we may encounter -- but I think this time having put a lot more effort into
verifying my work, I can at least hope to myself that I have acted responsibly
the once...

The cautionary tale
-------------------
Sigh, sometimes you lead by example...
and other times you "lead" by counter-example :-(

0. Zooko reports an error trying to use the darcs-benchmark 0.1.9
   we released. (bug A: the --converge feature tries to read content from
   .darcs-benchmark, completely overlooking the possibility that
   .darcs-benchmark exists)

1. I misdiagnose bug A (mistakenly thinking I had narrowed it down to the
   only two places it could occur) as being something else, submit a patch
   and notably (!), fail to try it out myself.  [A] this sort of cutting
   corners should be considered a form of disrespect for users -- you
   think you're "saving" time, but what you're really doing is demanding
   that somebody else give you theirs and [B] it's just generally foolish
   and inefficient.

2. Zooko reports that the error persists, I think I'd learned my lesson,
   and this time submit a patch having tested it out myself.

3. Zooko reports a new problem (bug B); I spot an easy solution, code it
   up and submit a patch, but in my confusion/distraction OMIT to compile
   it first (!).  Now, this wasn't intentional -- I'm sure many other
   Haskellers have "compile this please" hotkeyed to something they just
   thwack automatically and unconciously -- but [C] allowing myself to work
   in a sufficiently hurried/multi-tasky/distracted fashion that such mistakes
   can occur was irresponsible.  The more responsible approach would have been
   just to postpone this until I felt I had the attention to deal with it
   properly, or to ask if Petr could investigate as he is more familiar with
   the recent darcs-benchmark developments.

Remember the sort "haste makes waste, slowly by surely" attitude I like to talk
about? That's why I talk about it.  Focusing a little harder, and spending some
extra time to think about how to make it possible for me to recreate a scenario
similar to Zooko's would have saved him the effort of trying another iteration,
saved me the extra work of cleaning up after myself, the embarrassement of
sending one of these Haskell newbie never-seen-a-monad in your life bits of
code, the embarassement of being hoist on my own lead-by-example petard and so
on...

1 patch for repository http://code.haskell.org/darcs/darcs-benchmark:

Wed Sep  1 22:50:32 BST 2010  Eric Kow <kowey at darcs.net>
  * Account for darcs with buggy --exact-version.
  Treat these as having an empty context. :-(

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


More information about the darcs-users mailing list