darcs

Issue 924 wish: test for GHC and quickcheck version in darcs self-test (make recording easier)

Title wish: test for GHC and quickcheck version in darcs self-test (make recording easier)
Priority feature Status resolved
Milestone 2.1.x Resolved in
Superseder Nosy List E.Y.Kow, Serware, darcs-devel, dmitry.kurochkin, gwern, kowey, mikedlr, thorkilnaur, tommy
Assigned To
Topics

Created on 2008-06-16.07:11:06 by mikedlr, last changed 2010-06-15.21:47:52 by admin.

Files
File name Uploaded Type Edit Remove
darcs-simple-patch-record-fail.txt mikedlr, 2008-06-16.07:11:03 text/plain
Messages
msg5048 (view) Author: mikedlr Date: 2008-06-16.07:11:03
When I try to record a change to my local copy of the darcs repository I always
get an error during the record testcase.  

I got my repository with 
darcs get --lazy http://darcs.net

This happens both when I add a simple file or when I just add a line to the end
of the README file.  

src/Darcs/Patch/Real.lhs:99:26:
    GADT pattern match in non-rigid context for `NilRL'
      Tell GHC HQ if you'd like this to unify the context
    In the pattern: NilRL
    In the pattern: Just NilRL
    In a case alternative:
        Just NilRL
          -> ((\ imp_funny_name
                   -> imp_funny_name
                        ("src/Darcs/Patch/Real.lhs", 99, "08:45:04", "Jun 16 2008"))
                _bug)
               "found no patches in mergeUnravelled"


I would expect that this should succeed since it's a change which should have no
influence on the binary.

I would expect that if the version of GHC which I have can't compile darcs, the
configure script should give a warning (it doesn't)

This is the information about mh GHC install

Name        : ghc                          Relocations: (not relocatable)
Version     : 6.8.2                             Vendor: Fedora Project
Release     : 8.fc8                         Build Date: Mon 07 Jan 2008 10:49:12
PM CET
Install Date: Mon 02 Jun 2008 11:46:59 PM CEST      Build Host:
xenbuilder2.fedora.redhat.com
Group       : Development/Languages         Source RPM: ghc-6.8.2-8.fc8.src.rpm
Size        : 3095704                          License: BSD
Signature   : DSA/SHA1, Wed 16 Jan 2008 03:32:43 PM CET, Key ID b44269d04f2a6fd2
Packager    : Fedora Project
URL         : http://haskell.org/ghc/
Summary     : Glasgow Haskell Compilation system
Description :

Log file includes full set of actions to trigger this bug + also last entries in
darcs changes from repository to show latest update at time of darcs get
Attachments
msg5049 (view) Author: kowey Date: 2008-06-16.07:26:51
Thanks for the bug report!  This is a known issue, the workaround for which is
to set record --no-test (and amend-record --no-test) in your
_darcs/prefs/defaults for darcs.

David, this is biting enough people that we should re-consider our default test
prefs.  Maybe something like

autoconf && (./configure --with-type-witnesses && make -j4 witnesses && make
clean) || (./configure && make -j 4 all unit && make -j2 test_unit check
test_network)

But then again, that won't tell you all that much about the type witnesses :-(

[what's the issue again? Is this something GHC 6.6 used to support, but 6.8 no
longer does?]
msg5062 (view) Author: gwern Date: 2008-06-16.14:36:28
Yes, this issue is getting very annoying.

Anyway, Eric, what I heard attributed to Heffalump (perhaps by way of you or
lispy) was that 6.8 had tightened things up in such a way that you could use the
type witness code with it, but you needed to change the type signatures to be
more detailed or something. So I guess given how few people understand this
stuff, it's not likely to be fixed however anytime soon.
msg5064 (view) Author: droundy Date: 2008-06-16.16:47:09
On Mon, Jun 16, 2008 at 07:26:53AM -0000, Eric Kow wrote:
> But then again, that won't tell you all that much about the type
> witnesses :-(
> 
> [what's the issue again? Is this something GHC 6.6 used to support,
> but 6.8 no longer does?]

The type-checking of GADTs changes with each ghc release, so it's much
harder to make code compile on more than one version of the compiler.
ghc 6.8 requires some additional type signatures not required by ghc
6.6, and I believe also has a bug that causes it to give a wrong
error.  Hopefully we can get this working again with ghc 6.10, which
is supposed to have a saner type checker--or at least the known bug in
ghc 6.8 is supposed to be fixed.

And I'd rather change the default to record --no-test than change the
test.  True, I could use a different test on the main darcs computers,
but I think it'd be nicer to have a greater degree of transparency.

David
msg5073 (view) Author: mikedlr Date: 2008-06-16.21:23:37
I think that this would be worth fixing since it's quite offputting if you are
thinking of trying to work on darcs.  How about something simple like this test
which would make the test case conditional on the darcs version and gives a
warning to satisfy the transparency requirement.

if ghc --numeric-version | egrep '^6.8' > /dev/null; then echo 'GADT tests
disabled due to problems with GHC 6.8' ; autoconf && ./configure && make -j4
witnesses && make clean && make -j 4 all unit && make -j2 test_unit check
test_network else autoconf && ./configure --with-type-witnesses && make -j4
witnesses && make clean && ./configure && make -j 4 all unit && make -j2
test_unit check test_network; fi

incidentally, this fails with 


src/Darcs/Patch/Test.lhs:195:49:
    No instance for (Arbitrary Char)
      arising from a use of `unempty'
                   at src/Darcs/Patch/Test.lhs:195:49-55
    Possible fix: add an instance declaration for (Arbitrary Char)
    In the fifth argument of `liftM4', namely `unempty'
    In the expression: liftM4 patchinfo unempty unempty unempty unempty
    In the definition of `arbpi':
        arbpi = liftM4 patchinfo unempty unempty unempty unempty
make: *** [src/Darcs/Patch/Test.o] Error 1
make: *** Waiting for unfinished jobs....
Test failed!

any comments?  kowey's version seems to fail even more..

(rewrite of a comment due to cut and paste error)
msg5075 (view) Author: kowey Date: 2008-06-16.21:26:30
On Mon, Jun 16, 2008 at 21:20:20 -0000, Michael wrote:
> ghc --numeric-version | egrep '^6.8' > /dev/null; then echo 'GADT tests disabled
> due to problems with GHC 6.8' ; autoconf && ./configure && make -j4 witnesses &&
> make clean && make -j 4 all unit && make -j2 test_unit check test_network else
> autoconf && ./configure --with-type-witnesses && make -j4 witnesses && make
> clean && ./configure && make -j 4 all unit && make -j2 test_unit check
> test_network; fi

I think I like your version better, for what it's worth.

> src/Darcs/Patch/Test.lhs:195:49:
>     No instance for (Arbitrary Char)
>       arising from a use of `unempty'
>                    at src/Darcs/Patch/Test.lhs:195:49-55
>     Possible fix: add an instance declaration for (Arbitrary Char)
>     In the fifth argument of `liftM4', namely `unempty'
>     In the expression: liftM4 patchinfo unempty unempty unempty unempty
>     In the definition of `arbpi':
>         arbpi = liftM4 patchinfo unempty unempty unempty unempty
> make: *** [src/Darcs/Patch/Test.o] Error 1
> make: *** Waiting for unfinished jobs....
> Test failed!
> 
> any comments?  kowey's version seems to fail even more..

Hmm, you might need to have quickcheck 2 installed, (or maybe that's a
red herring).  I personally do not know :-(
msg5078 (view) Author: droundy Date: 2008-06-16.21:38:50
Mike:

Patches are welcome.  If we're going to implement tricky logic, I think a better
place to put this would be in the configure script, or in the makefile.  For
instance, we could move the


witnesses: src/Darcs/Patch/Real.hi src/Darcs/Patch/Properties.hi
src/Darcs/Patch.hi \
	src/Darcs/Repository/ApplyPatches.hi src/Darcs/Patch/Bundle.hi \
	src/Darcs/Patch/Match.hi src/Darcs/Repository/HashedRepo.hi \
	src/Darcs/Resolution.hi src/Darcs/Patch/Check.hi \
	src/Darcs/Repository/Pristine.hi src/Darcs/Repository/DarcsRepo.hi

from the GNUmakefile to autoconf.mk.in, and make it depend on the discovered ghc
version.

We could do something analogous for test_unit if quickcheck 2 isn't found (and
print a message at either test-time or configure-time).  This is definitely not
a 2.0.1-blocker.

David
msg5919 (view) Author: E.Y.Kow Date: 2008-09-05.14:24:36
The following patch updated the status of issue924 to be resolved:

* Resolve issue924: test for QuickCheck2 in disttest
History
Date User Action Args
2008-06-16 07:11:06mikedlrcreate
2008-06-16 07:26:53koweysetpriority: urgent -> bug
status: unread -> wont-fix
messages: + msg5049
nosy: + droundy, kowey
2008-06-16 07:28:47koweysetnosy: droundy, tommy, beschmi, kowey, dagit, mikedlr
superseder: + ./configure --with-docs implies --with-type-witnesses?
2008-06-16 07:29:28koweysetnosy: droundy, tommy, beschmi, kowey, dagit, mikedlr
superseder: - ./configure --with-docs implies --with-type-witnesses?
2008-06-16 07:29:54koweysetnosy: droundy, tommy, beschmi, kowey, dagit, mikedlr
title: Unable to record patch to darcs -> Unable to record patch to darcs (type witnesses in test)
2008-06-16 14:36:29gwernsetnosy: + gwern
messages: + msg5062
2008-06-16 16:47:12droundysetnosy: droundy, tommy, beschmi, kowey, dagit, gwern, mikedlr
messages: + msg5064
title: Unable to record patch to darcs (type witnesses in test) -> Unable to record patch to darcs
2008-06-16 21:20:20mikedlrsetnosy: droundy, tommy, beschmi, kowey, dagit, gwern, mikedlr
messages: + msg5072
2008-06-16 21:22:13mikedlrsetnosy: droundy, tommy, beschmi, kowey, dagit, gwern, mikedlr
messages: - msg5072
2008-06-16 21:23:39mikedlrsetnosy: droundy, tommy, beschmi, kowey, dagit, gwern, mikedlr
messages: + msg5073
2008-06-16 21:26:32koweysetnosy: droundy, tommy, beschmi, kowey, dagit, gwern, mikedlr
messages: + msg5075
2008-06-16 21:38:53droundysetnosy: droundy, tommy, beschmi, kowey, dagit, gwern, mikedlr
messages: + msg5078
2008-06-16 21:39:05droundysetpriority: bug -> feature
status: wont-fix -> unknown
nosy: droundy, tommy, beschmi, kowey, dagit, gwern, mikedlr
2008-06-27 09:46:25koweysetnosy: droundy, tommy, beschmi, kowey, dagit, gwern, mikedlr
title: Unable to record patch to darcs -> wish: test for GHC version in darcs self-test (make recording easier)
2008-06-27 09:47:50koweysettopic: + Target-2.0
nosy: + Serware
2008-06-27 09:48:26koweysetnosy: droundy, tommy, beschmi, kowey, dagit, gwern, Serware, mikedlr
title: wish: test for GHC version in darcs self-test (make recording easier) -> wish: test for GHC and quickcheck version in darcs self-test (make recording easier)
2008-08-17 09:17:22koweysettopic: + Target-2.1, - Target-2.0
nosy: droundy, tommy, beschmi, kowey, dagit, gwern, Serware, mikedlr
2008-09-05 14:24:38E.Y.Kowsetstatus: unknown -> resolved-in-unstable
nosy: + E.Y.Kow
messages: + msg5919
2009-04-22 03:30:27twbsetstatus: resolved-in-unstable -> resolved
nosy: + dmitry.kurochkin, simon, thorkilnaur
2009-08-06 17:59:04adminsetnosy: + markstos, jast, darcs-devel, zooko, mornfall, - droundy, gwern, E.Y.Kow, mikedlr
2009-08-06 21:08:08adminsetnosy: - beschmi
2009-08-10 22:21:21adminsetnosy: + mikedlr, E.Y.Kow, gwern, - markstos, darcs-devel, zooko, jast, mornfall
2009-08-11 00:17:16adminsetnosy: - dagit
2009-08-25 17:44:12adminsetnosy: + darcs-devel, - simon
2009-08-27 14:18:23adminsetnosy: tommy, kowey, darcs-devel, thorkilnaur, gwern, dmitry.kurochkin, E.Y.Kow, Serware, mikedlr
2009-10-23 22:43:27adminsetnosy: + serware, - Serware
2009-10-23 23:29:22adminsetnosy: + Serware, - serware
2010-06-15 21:47:52adminsetmilestone: 2.1.x
2010-06-15 21:47:52adminsettopic: - Target-2.1