Skip to content
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

error Test.QuickCheck.resize: negative size since 0.2.1 #14

Closed
hasufell opened this issue Apr 15, 2022 · 3 comments
Closed

error Test.QuickCheck.resize: negative size since 0.2.1 #14

hasufell opened this issue Apr 15, 2022 · 3 comments

Comments

@hasufell
Copy link

GHCup uses generic-arbitrary: https://gitlab.haskell.org/haskell/ghcup-hs/-/blob/master/test/GHCup/ArbitraryTypes.hs

Since 0.2.1 the tests fail with:

Test suite ghcup-test: RUNNING...
FF
Failures:

  src/Test/Aeson/Internal/RoundtripSpecs.hs:59:5:
  1) GHCup.Types.JSON, JSON encoding of GHCupInfo, allows to encode values with aeson and read them back
       uncaught exception: ErrorCall
       Test.QuickCheck.resize: negative size
       CallStack (from HasCallStack):
         error, called at src/Test/QuickCheck/Gen.hs:135:22 in QuickCheck-2.14.2-a4039abb5c2bf61956f8dce1084c880ba597c6b14935be0ae502da628dbe9111:Test.QuickCheck.Gen
       (after 1 test)
         Exception thrown while showing test case:
           Test.QuickCheck.resize: negative size
           CallStack (from HasCallStack):
             error, called at src/Test/QuickCheck/Gen.hs:135:22 in QuickCheck-2.14.2-a4039abb5c2bf61956f8dce1084c880ba597c6b14935be0ae502da628dbe9111:Test.QuickCheck.Gen


  To rerun use: --match "/GHCup.Types.JSON/JSON encoding of GHCupInfo/allows to encode values with aeson and read them back/"

  src/Test/QuickCheck/Gen.hs:135:22:
  2) GHCup.Types.JSON, JSON encoding of GHCupInfo, produces the same JSON as is found in test/golden/GHCupInfo.json
       uncaught exception: ErrorCall
       Test.QuickCheck.resize: negative size
       CallStack (from HasCallStack):
         error, called at src/Test/QuickCheck/Gen.hs:135:22 in QuickCheck-2.14.2-a4039abb5c2bf61956f8dce1084c880ba597c6b14935be0ae502da628dbe9111:Test.QuickCheck.Gen

  To rerun use: --match "/GHCup.Types.JSON/JSON encoding of GHCupInfo/produces the same JSON as is found in test/golden/GHCupInfo.json/"

Randomized with seed 25004185

Finished in 0.2310 seconds
2 examples, 2 failures

I'm suspecting it may be 0e2e124

@eborden
Copy link

eborden commented Apr 19, 2022

This is blocking our (Freckle) use of generic-arbitrary in stackage LTS 19.3. Can we provide any help in getting the fix PRs (#10) merged and a new release cut?

@eborden
Copy link

eborden commented May 4, 2022

Is there any movement to get this fixed? Do you need any help cutting a release with the patch?

@ilyakooo0
Copy link
Member

@eborden Thanks for bringing this issue up again

0.2.2 is now released with the fix: https://hackage.haskell.org/package/generic-arbitrary-0.2.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants