New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
haskellPackages.grammatical-parsers: unmark broken #71383
Conversation
Not sure why this has picked up two commits; a cherry-pick may be warranted. Note also the commit message on my commit: there's a nondeterministic test failure that I haven't been able to replicate. How would you like to proceed? |
@endgame Can you change the merge base into the If you haven't seen it, you might want to check out the video on updating Haskell packages: https://discourse.nixos.org/t/video-tutorial-how-to-fix-broken-haskell-packages-in-nix/3968
As far as I am aware, non-deterministic test failures are generally not accepted into nixpkgs. If you're sure this isn't actually a problem, you could mark the package nixpkgs/pkgs/development/haskell-modules/configuration-common.nix Lines 51 to 53 in abf263f
Please also report this test failure upstream and leave a link to it in a comment in the above file. This will help the nixpkgs maintainers know when (I tried compiling this and I ran into the test failing.) Also, one last thing, as long as you'll be rebasing your changes on top of |
I did see a timeout in the test suite, in the mconcat property test provided by checkers, but lost the seed.
b287b9e
to
fef2a72
Compare
Fixed most of your comments. The test failure is a timeout: I suspect on the one particular run, checkers generated a giant test which caused the failure. Are time limits on test suites imposed by nixpkgs or by cabal? |
@endgame Thanks for updating this PR. When running the tests on my machine, the test failure looks like the following: Running 2 test suites...
Test suite quicktests: RUNNING...
Grampa
...
classes
monoid
left identity: OK
+++ OK, passed 100 tests.
right identity: OK
+++ OK, passed 100 tests.
associativity: OK (0.21s)
+++ OK, passed 100 tests.
mappend = (<>): OK (0.16s)
+++ OK, passed 100 tests.
mconcat: FAIL (2.14s)
*** Failed! Timeout (after 95 tests):
Use --quickcheck-replay=83506 to reproduce.
functor
identity: OK
+++ OK, passed 100 tests.
compose: OK
+++ OK, passed 100 tests.
applicative
identity: OK
+++ OK, passed 100 tests.
composition: OK (0.02s)
+++ OK, passed 100 tests.
homomorphism: OK
+++ OK, passed 100 tests.
interchange: OK
+++ OK, passed 100 tests.
functor: OK
+++ OK, passed 100 tests.
Alternative laws
left identity: OK
+++ OK, passed 100 tests.
right identity: OK
+++ OK, passed 100 tests.
associativity: OK (0.02s)
+++ OK, passed 100 tests.
monad laws
left identity: OK
+++ OK, passed 100 tests.
right identity: OK
+++ OK, passed 100 tests.
associativity: OK
+++ OK, passed 100 tests.
pure: OK
+++ OK, passed 100 tests.
ap: OK
+++ OK, passed 100 tests.
monad functor
bind return: OK
+++ OK, passed 100 tests.
monad applicative
pure: OK
+++ OK, passed 100 tests.
ap: OK
+++ OK, passed 100 tests.
MonadPlus laws
left zero: OK
+++ OK, passed 100 tests.
left identity: OK
+++ OK, passed 100 tests.
right identity: OK
+++ OK, passed 100 tests.
associativity: OK (0.01s)
+++ OK, passed 100 tests.
left distribution: OK (0.01s)
+++ OK, passed 100 tests.
...
1 out of 56 tests failed (3.50s)
Test suite quicktests: FAIL
Test suite logged to: dist/test/grammatical-parsers-0.4.1.1-quicktests.log
Test suite doctests: RUNNING...
Test suite doctests: PASS
Test suite logged to: dist/test/grammatical-parsers-0.4.1.1-doctests.log
1 of 2 test suites (1 of 2 test cases) passed.
builder for '/nix/store/1z673v0mjl39hcrp1nnz3a1p3n4g70hj-grammatical-parsers-0.4.1.1.drv' failed with exit code 1
error: build of '/nix/store/1z673v0mjl39hcrp1nnz3a1p3n4g70hj-grammatical-parsers-0.4.1.1.drv' failed Here's the line in question:
It does appear to be a timeout, as you suggest. My guess is that this is a timeout from QuickCheck. You might want to try running this test with If the error does still occur, please report it upstream so the author knows to bump the timeout (or scale down the size of generated test cases). If the error doesn't still occur, then it is likely some sort of nix-related problem. The easiest solution is probably just to disable the tests with |
Confirmed timeouts outside of nixpkgs, reported upstream. |
QuickCheck supports timeouts for its tests: http://hackage.haskell.org/package/QuickCheck-2.13.2/docs/Test-QuickCheck.html#v:within. I guess these are necessary for properties that rely on At the same time, it's feels silly to hard-code magic timeout values into your test suite, because what constitutes a reasonable timeout depends entirely on the environment that runs the tests, so how is the developer supposed to know that? If anything, that should be a command-line argument to the test suite. |
grammatical-parsers-0.4.1.2 just got pushed to hackage, with a max test size and raised time limit. I'm only here because I'm N levels into a yakshave and I don't think many people are using the package, so let's wait for the package set updates to pull grammatical-parsers-0.4.1.2, then merge this. That way we don't have to do the |
Motivation for this change
haskellPackages.grammatical-parsers builds with
config.allowBroken = true
.Fixes #68468
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers
cc @peti