darcs

Issue 583 fromJust error in Viewing.lhs when reverting certain combinations of hunks in a repo

Title fromJust error in Viewing.lhs when reverting certain combinations of hunks in a repo
Priority bug Status resolved
Milestone Resolved in
Superseder Nosy List darcs-devel, dmitry.kurochkin, kowey, thorkilnaur, tommy, wjt
Assigned To droundy
Topics

Created on 2008-01-11.15:51:12 by will, last changed 2009-10-24.00:15:58 by admin.

Messages
msg2432 (view) Author: wjt Date: 2008-01-11.15:51:11
Afternoon,

I ran into a bug whereby reverting some but not all of the hunks in a
particular repository yields:

    Do you really want to revert these changes? y
    darcs: bug in darcs!
    fromJust errorsrc/Darcs/Patch/Viewing.lhs:84 compiled Dec 18 2007 00:40:56 at src/Darcs/Patch/Viewing.lhs:84 compiled Dec 18 2007 00:40:56
    Please report this to bugs@darcs.net,
    If possible include the output of 'darcs --exact-version'.

`darcs --exact-version` yields:

    darcs compiled on Dec 18 2007, at 00:48:49
    unknown

which is not particularly illuminating.  It is in fact built from
darcs-2.0.0pre2.tar.gz with GHC 6.6.1 on Ubuntu Gusty (7.10).

Some experimentation has revealed that, in this particular repository,
the error can be reproduced by choosing:

 * not to revert the first hunk, then
 * to revert at least two other hunks, which need not be adjacent.

If, instead, you revert only the first hunk, then the bug is still
reproducable with the same steps in the resulting working copy.

I've taken a quick peek at Viewing.lhs and at Apply.lhs, but can't see
an obvious cause.

I have tarred and feathered the repository to
<http://www.willthompson.co.uk/tmp/hfuse-fromJust-viewing_lhs.tar.bz2>,
in the hope that it will be of some use!

Thanks,
msg2436 (view) Author: droundy Date: 2008-01-11.16:18:31
On Fri, Jan 11, 2008 at 03:51:12PM -0000, Will Thompson wrote:
> I ran into a bug whereby reverting some but not all of the hunks in a
> particular repository yields:
> 
>     Do you really want to revert these changes? y
>     darcs: bug in darcs!
>     fromJust errorsrc/Darcs/Patch/Viewing.lhs:84 compiled Dec 18 2007 00:40:56 at src/Darcs/Patch/Viewing.lhs:84 compiled Dec 18 2007 00:40:56
>     Please report this to bugs@darcs.net,
>     If possible include the output of 'darcs --exact-version'.
> 
> `darcs --exact-version` yields:
> 
>     darcs compiled on Dec 18 2007, at 00:48:49
>     unknown
> 
> which is not particularly illuminating.  It is in fact built from
> darcs-2.0.0pre2.tar.gz with GHC 6.6.1 on Ubuntu Gusty (7.10).
> 
> Some experimentation has revealed that, in this particular repository,
> the error can be reproduced by choosing:
> 
>  * not to revert the first hunk, then
>  * to revert at least two other hunks, which need not be adjacent.

Thanks for the well-written bug report! Unfortunately, I haven't yet been
able to reproduce this bug.  So if you can keep your system in a state that
can reproduce this bug, I'll appreciate it.  The next thing is to try
running with the same version of darcs you had, which really ought to
work.  It may be that I accidentally (or even intentionally?) fixed it, and
just can't remember what I changed.  I'll report back when I've tested
this.
-- 
David Roundy
Department of Physics
Oregon State University
msg2440 (view) Author: droundy Date: 2008-01-11.17:39:43
I can confirm that this is fixed in the latest darcs-unstable by the patch

Mon Dec 17 13:32:34 EST 2007  David Roundy <droundy@darcs.net>
  * make a few more files compile with type witnesses.

It's not got the sort of name that suggests it fixes a bug.  :( What happened
was that when adding type witnesses to a bunch of files, I found and fixed the
bug, but then forgot that I had done so when I recorded.  But once again, type
witnesses came to the rescue! (since they made the buggy version unable to compile!)

David
History
Date User Action Args
2008-01-11 15:51:12willcreate
2008-01-11 16:18:34droundysetstatus: unread -> unknown
messages: + msg2436
2008-01-11 17:39:45droundysetstatus: unknown -> resolved-in-unstable
messages: + msg2440
2008-01-22 15:14:30droundysetassignedto: droundy
nosy: droundy, tommy, beschmi, kowey, will
2008-09-04 21:31:52adminsetstatus: resolved-in-unstable -> resolved
nosy: + dagit
2009-08-06 17:33:42adminsetnosy: + markstos, jast, Serware, dmitry.kurochkin, darcs-devel, zooko, mornfall, simon, thorkilnaur, - droundy, will
2009-08-06 20:31:09adminsetnosy: - beschmi
2009-08-10 22:10:37adminsetnosy: + will, - markstos, darcs-devel, zooko, jast, Serware, mornfall
2009-08-11 00:04:26adminsetnosy: - dagit
2009-08-25 17:48:24adminsetnosy: + darcs-devel, - simon
2009-08-27 14:08:02adminsetnosy: tommy, kowey, darcs-devel, thorkilnaur, will, dmitry.kurochkin
2009-10-24 00:15:58adminsetnosy: + wjt, - will